private void loadIcon(string strIconResourceName) { Stream stm = ManifestResources.GetManifestResource(strIconResourceName); Image img = ByteImageConverter.StreamToImage(stm); img.Width = 20; img.Height = 20; img.HorizontalAlignment = HorizontalAlignment.Stretch; img.VerticalAlignment = VerticalAlignment.Stretch; this.Icon = img; }