Hi,
so i am trying to figure out how to set the tile state to maximized if there is only 1 tile in the itemsSource. I wrote an IValue converter that would return the proper state value, but i cannot seem to find what/how to bind that converter to anything applicable. Thanks in advance for the help.
Matt
Hi Matt,
You should be abe to bind to the Tile's State property. Can you post the converter code and the xaml that creates the binding? I'
Hello,
Another way to do this it to handle the CollectionChanged of the source collection that is bound to the XamTilesControl and Maximize the tile from there, like this:
ObservableCollection<string> source = new ObservableCollection<string>();
xamTilesControl.ItemsSource= source;
source.CollectionChanged += (s, e) =>
{
if (source.Count == 1)
var callback = new DispatcherOperationCallback(SetExpanded);
this.Dispatcher.BeginInvoke(DispatcherPriority.ApplicationIdle, callback, null);
}
};
private object SetExpanded(object parameter)
Tile tile = xamTilesControl.TileFromItem(source[0]);
tile.State = TileState.Maximized;
return null;