public void UpdateDeviceIcon() { var icon = DeviceIconManager.LoadIcon(this._Peer.MacAddress); var resourceName = icon.Icon.ToResourceName(); imgDeviceIcon.Source = (ImageSource)FindResource(resourceName); }
private void btnChangeIcon_Click(object sender, RoutedEventArgs e) { var dialog = new DeviceIconPicker(lblDisplayName.Content.ToString()); dialog.SelectedIcon = DeviceIconManager.LoadIcon(this.PeerDevice.Peer.MacAddress).Icon; dialog.Owner = this; if (dialog.ShowDialog() == true) { DeviceIconManager.SaveIcon(this.PeerDevice.Peer.MacAddress, dialog.SelectedIcon); this.PeerDevice.UpdateDeviceIcon(); UpdateDisplay(); } }