Browse Source

Attempt 3 at fixing nonsense build error

pull/1645/head
Christopher Brown 7 years ago
parent
commit
d5d2fcb6bf
  1. 2
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml
  2. 10
      ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs

2
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml

@ -29,7 +29,7 @@
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<local:CollectionControl x:Name="_collectionControl" <local:CollectionControl x:Name="_localCollectionControl"
ItemsSourceType="{Binding ItemsSourceType, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" ItemsSourceType="{Binding ItemsSourceType, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"
ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Mode=TwoWay}" ItemsSource="{Binding ItemsSource, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}, Mode=TwoWay}"
NewItemTypes="{Binding NewItemTypes, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" NewItemTypes="{Binding NewItemTypes, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"

10
ExtendedWPFToolkitSolution/Src/Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControlDialog.xaml.cs

@ -117,7 +117,7 @@ namespace Xceed.Wpf.Toolkit
{ {
get get
{ {
return _collectionControl; return _localCollectionControl;
} }
} }
@ -175,14 +175,14 @@ namespace Xceed.Wpf.Toolkit
} }
} }
_collectionControl.PersistChanges(); _localCollectionControl.PersistChanges();
this.DialogResult = true; this.DialogResult = true;
this.Close(); this.Close();
} }
private void CancelButton_Click( object sender, RoutedEventArgs e ) private void CancelButton_Click( object sender, RoutedEventArgs e )
{ {
_collectionControl.PersistChanges( originalData ); _localCollectionControl.PersistChanges( originalData );
this.DialogResult = false; this.DialogResult = false;
this.Close(); this.Close();
} }
@ -329,7 +329,7 @@ namespace Xceed.Wpf.Toolkit
private bool AreDictionaryKeysValid() private bool AreDictionaryKeysValid()
{ {
var keys = _collectionControl.Items.Select( x => var keys = _localCollectionControl.Items.Select( x =>
{ {
var keyType = x.GetType().GetProperty( "Key" ); var keyType = x.GetType().GetProperty( "Key" );
if( keyType != null ) if( keyType != null )
@ -339,7 +339,7 @@ namespace Xceed.Wpf.Toolkit
return null; return null;
} ); } );
return ( keys.Distinct().Count() == _collectionControl.Items.Count ) return ( keys.Distinct().Count() == _localCollectionControl.Items.Count )
&& keys.All( x => x != null ); && keys.All( x => x != null );
} }

Loading…
Cancel
Save