File tree Expand file tree Collapse file tree 3 files changed +22
-5
lines changed
MaterialDesignThemes.Wpf/Themes Expand file tree Collapse file tree 3 files changed +22
-5
lines changed Original file line number Diff line number Diff line change 4
4
using System . Linq ;
5
5
using System . Runtime . CompilerServices ;
6
6
using System . Runtime . InteropServices ;
7
+ using System . Security . Cryptography . X509Certificates ;
7
8
using System . Text ;
8
9
using System . Threading . Tasks ;
9
10
@@ -14,10 +15,13 @@ public class TextFieldsViewModel : INotifyPropertyChanged
14
15
private readonly IList < int > _longListToTestComboVirtualization ;
15
16
16
17
private string _name ;
18
+ private int _selectedValueOne ;
17
19
18
20
public TextFieldsViewModel ( )
19
21
{
20
- _longListToTestComboVirtualization = new List < int > ( Enumerable . Range ( 0 , 1000 ) ) ;
22
+ _longListToTestComboVirtualization = new List < int > ( Enumerable . Range ( 0 , 1000 ) ) ;
23
+
24
+ SelectedValueOne = _longListToTestComboVirtualization . Skip ( 2 ) . First ( ) ;
21
25
}
22
26
23
27
public string Name
@@ -30,6 +34,16 @@ public string Name
30
34
}
31
35
}
32
36
37
+ public int SelectedValueOne
38
+ {
39
+ get { return _selectedValueOne ; }
40
+ set
41
+ {
42
+ _selectedValueOne = value ;
43
+ OnPropertyChanged ( ) ;
44
+ }
45
+ }
46
+
33
47
public IList < int > LongListToTestComboVirtualization => _longListToTestComboVirtualization ;
34
48
35
49
public event PropertyChangedEventHandler PropertyChanged ;
Original file line number Diff line number Diff line change 5
5
xmlns : d =" http://schemas.microsoft.com/expression/blend/2008"
6
6
xmlns : wpf =" clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
7
7
xmlns : wpfExample =" clr-namespace:MaterialDesignColors.WpfExample"
8
+ xmlns : domain =" clr-namespace:MaterialDesignColors.WpfExample.Domain"
8
9
mc : Ignorable =" d"
9
- d : DesignHeight =" 300" d : DesignWidth =" 600" Loaded =" UserControl_Loaded" >
10
+ d : DesignHeight =" 300" d : DesignWidth =" 600" Loaded =" UserControl_Loaded"
11
+ d : DataContext =" {d:DesignInstance domain:TextFieldsViewModel, d:IsDesignTimeCreatable=False}" >
10
12
<UserControl .Resources>
11
13
<ResourceDictionary >
12
14
<ResourceDictionary .MergedDictionaries>
132
134
133
135
<StackPanel Grid.Row=" 4" Grid.Column=" 4" Orientation =" Horizontal" >
134
136
<ComboBox wpf:TextFieldAssist.Hint=" Virtualisation"
135
- HorizontalAlignment =" Left" Margin =" 16 0 0 0"
136
- ItemsSource =" {Binding LongListToTestComboVirtualization}" >
137
+ HorizontalAlignment =" Left" Margin =" 16 0 0 0"
138
+ ItemsSource =" {Binding LongListToTestComboVirtualization}"
139
+ SelectedValue =" {Binding SelectedValueOne}" >
137
140
<ComboBox .ItemsPanel>
138
141
<ItemsPanelTemplate >
139
142
<VirtualizingStackPanel />
Original file line number Diff line number Diff line change 124
124
<Condition Property =" Tag" Value =" 1.0" />
125
125
<Condition Property =" IsSelected" Value =" True" />
126
126
</MultiTrigger .Conditions>
127
- <Setter Property =" Visibility " Value =" Collapsed " />
127
+ <Setter Property =" Height " Value =" 0 " />
128
128
</MultiTrigger >
129
129
</ControlTemplate .Triggers>
130
130
</ControlTemplate >
You can’t perform that action at this time.
0 commit comments