Click here to Skip to main content
15,913,773 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Highlight Searched Text with ListView in WPF Pin
Gerry Schmitz28-Feb-18 7:53
mveGerry Schmitz28-Feb-18 7:53 
QuestionWPF memory leak BitmapImage Pin
Leif Simon Goodwin21-Feb-18 1:53
Leif Simon Goodwin21-Feb-18 1:53 
AnswerRe: WPF memory leak BitmapImage Pin
#realJSOP22-Feb-18 1:32
professional#realJSOP22-Feb-18 1:32 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:30
Leif Simon Goodwin22-Feb-18 5:30 
AnswerRe: WPF memory leak BitmapImage Pin
MadMyche22-Feb-18 4:09
professionalMadMyche22-Feb-18 4:09 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:31
Leif Simon Goodwin22-Feb-18 5:31 
GeneralRe: WPF memory leak BitmapImage Pin
MadMyche22-Feb-18 8:31
professionalMadMyche22-Feb-18 8:31 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin23-Feb-18 2:36
Leif Simon Goodwin23-Feb-18 2:36 
AnswerRe: WPF memory leak BitmapImage Pin
Gerry Schmitz22-Feb-18 4:46
mveGerry Schmitz22-Feb-18 4:46 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 5:29
Leif Simon Goodwin22-Feb-18 5:29 
GeneralRe: WPF memory leak BitmapImage Pin
Gerry Schmitz22-Feb-18 5:54
mveGerry Schmitz22-Feb-18 5:54 
GeneralRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin22-Feb-18 23:57
Leif Simon Goodwin22-Feb-18 23:57 
AnswerRe: WPF memory leak BitmapImage Pin
Leif Simon Goodwin8-Mar-18 22:35
Leif Simon Goodwin8-Mar-18 22:35 
Question"Cylinder lens" scrollbar Pin
kalberts19-Feb-18 3:33
kalberts19-Feb-18 3:33 
AnswerRe: "Cylinder lens" scrollbar Pin
Gerry Schmitz19-Feb-18 6:53
mveGerry Schmitz19-Feb-18 6:53 
GeneralRe: "Cylinder lens" scrollbar Pin
kalberts19-Feb-18 22:18
kalberts19-Feb-18 22:18 
QuestionPassing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Dwayne Barsotta27-Jan-18 6:05
Dwayne Barsotta27-Jan-18 6:05 
AnswerRe: Passing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Gerry Schmitz27-Jan-18 12:10
mveGerry Schmitz27-Jan-18 12:10 
GeneralRe: Passing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Dwayne Barsotta27-Jan-18 12:20
Dwayne Barsotta27-Jan-18 12:20 
GeneralRe: Passing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Gerry Schmitz27-Jan-18 12:54
mveGerry Schmitz27-Jan-18 12:54 
GeneralRe: Passing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Dwayne Barsotta27-Jan-18 19:47
Dwayne Barsotta27-Jan-18 19:47 
GeneralRe: Passing Data From a window to the mainview(shellViewModel) using EventAggregator - WPF Caliburn.Micro Pin
Gerry Schmitz28-Jan-18 8:28
mveGerry Schmitz28-Jan-18 8:28 
QuestionWPF ListCollectionView CustomSort - how to turn off live sorting Pin
Jonas Thor27-Jan-18 1:16
Jonas Thor27-Jan-18 1:16 
I have implemented custom sort for a ListCollection view. The data is displayed in a DataGrid. The actual sorting is functioning. I have this code:
C#
ObservableCollection<ConnectionViewModel> _connections;
private ICollectionView CV { get; set; }

public ConnectionsTabViewModel()
{
    _connections = new ObservableCollection<ConnectionViewModel>();
    CV = CollectionViewSource.GetDefaultView(_connections);
}

public void Sort()
{
    if (CV is ListCollectionView view)
    {
        view.CustomSort = new ConnectionViewModelComparer();
    }
}


public void StopSorting()
{

   if (CV is ListCollectionView view)
   {
       view.IsLiveSorting = false;
       //view.CustomSort = null;
    }
}

I want to be able to turn on/off real time sorting when data is edited or added. I thought that setting the ListCollectionView property IsLiveSorting to false would achieve this but if I edit data in the DataGrid the rows are still sorted in real time. Have I misunderstood something?

I tried to solve this issue by setting view.CustomSort to null but by doing so the data is returned to the original state/order before sorting. Is there a simple way to turn off sorting and keeping the data in the same order as it was before sorting is turned off?
AnswerRe: WPF ListCollectionView CustomSort - how to turn off live sorting Pin
Gerry Schmitz27-Jan-18 12:19
mveGerry Schmitz27-Jan-18 12:19 
GeneralRe: WPF ListCollectionView CustomSort - how to turn off live sorting Pin
Jonas Thor31-Jan-18 4:00
Jonas Thor31-Jan-18 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.