+SL+Buttonコントロール のバックアップ(No.1) - PukiWiki

Silverlightコントロール全般?

Buttonの背景を写真に設定する
[edit]

 この方法で設定したボタンの写真背景がはっきり見えません。

MemoryStream ms =new MemoryStream (SilverlightBusinessApplication1.Assets.Resources.Images.);
BitmapImage bi = new BitmapImage();
bi.SetSource(ms);

Button brt = new Button();
brt.Width = 43;
brt.Height= 43; 
brt.Background = new ImageBrush() { ImageSource = bi };

このページのトップへ

ボタンをImageButtonのようにみえる
[edit]

MemoryStream ms =new MemoryStream (SilverlightBusinessApplication1.Assets.Resources.Images.);
BitmapImage bi = new BitmapImage();
bi.SetSource(ms);
Image image = new Image();
image.Source = bi;

Button brt = new Button();
brt.Width = 43;
brt.Height= 43; 
brt.Content = image;

コメント:



0


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS

PCpዾyǗlgĂ܂}WŔ܂z 萔O~ył񂫁z Yahoo yV NTT-X Store

z[y[W ̃NWbgJ[h COiq ӂ邳Ɣ[ COsیI COze