private void btnChangeIcon_Click(object sender, RoutedEventArgs e) { var dialog = new DeviceIconPicker(lblDisplayName.Content.ToString()); dialog.SelectedIcon = DeviceIconManager.LoadIcon(this.PeerDevice.Peer.storage.MACAddress).Icon; dialog.Owner = this; if (dialog.ShowDialog() == true) { DeviceIconManager.SaveIcon(this.PeerDevice.Peer.storage.MACAddress, dialog.SelectedIcon); this.PeerDevice.UpdateDeviceIcon(); UpdateDisplay(); } }