imagebrush

    1熱度

    1回答

    我目前定義的用戶控件這樣的背景: <UserControl.Background> <ImageBrush ImageSource="{DynamicResource LeftMenuBackgroundImage}" /> </UserControl.Background> 我如何才能將這個代碼隱藏,如: 僞代碼: StackPanel sp = new StackPanel()

    1熱度

    2回答

    我有以下ImageBrush聲明,我想用它來繪製窗口的背景。 <ImageBrush x:Key="Fondo" ImageSource="Fondo.png" Viewport="0,0,0.1,0.1" TileMode="Tile"/> 如果我使用靜態資源綁定到窗口的背景屬性設置它刷正確呈現,但圖像被縮放。這是我不想要的行爲,我希望應用程序以其原始分辨率使用

    0熱度

    1回答

    我想從Silverlight Bing地圖控件添加圖像到圖釘實例,但我似乎無法讓它呈現(圖釘渲染罰款)。這可能是一個普通的WPF問題,而不是特定於Pushpin對象的任何事情。 Pushpin pp = new Pushpin(); ... Uri imageUri = new Uri(@"myImage.png", UriKind.Relative); BitmapImage imag

    9熱度

    1回答

    我想爲我的窗口創建一個背景,這是我想要水平重複的圖像。到目前爲止,我已經嘗試過使用ImageBrush,但是這個選項在水平和垂直方向重複圖像。另外,當用戶調整窗口大小時,我不希望它縮放,因爲它使圖像看起來很有趣。 有什麼想法?

    1熱度

    1回答

    我想使用ImageBrush在Rectangle.Fill中使用。該文件是一個.PNG。它看起來像坐在一個小灰色的墊子上。該ImageBrush從轉換器返回了這樣的事情: BitmapImage image = new BitmapImage(new Uri(fileName)); ImageBrush imageBrush = new ImageBrush(); ima