Click here to Skip to main content
15,915,093 members
Home / Discussions / WPF
   

WPF

 
QuestionDatabinding to simple controls with RIA services Pin
RB@Emphasys10-Dec-09 12:24
RB@Emphasys10-Dec-09 12:24 
AnswerRe: Databinding to simple controls with RIA services Pin
Mark Salsbery10-Dec-09 13:14
Mark Salsbery10-Dec-09 13:14 
GeneralRe: Databinding to simple controls with RIA services Pin
RB@Emphasys11-Dec-09 3:26
RB@Emphasys11-Dec-09 3:26 
QuestionDownload dynamic data with Silverlight app Pin
thrakazog10-Dec-09 7:06
thrakazog10-Dec-09 7:06 
AnswerRe: Download dynamic data with Silverlight app Pin
Mark Salsbery10-Dec-09 7:22
Mark Salsbery10-Dec-09 7:22 
GeneralRe: Download dynamic data with Silverlight app Pin
thrakazog10-Dec-09 7:32
thrakazog10-Dec-09 7:32 
GeneralRe: Download dynamic data with Silverlight app Pin
Mark Salsbery10-Dec-09 7:36
Mark Salsbery10-Dec-09 7:36 
QuestionRounded ListBox Pin
shanmugarajaa9-Dec-09 20:03
shanmugarajaa9-Dec-09 20:03 
Hi,
To get Rounded edge Listbox i searched for samples and finally get that.Here my code.
In XAML:
<ListBox Margin="22,122,27,126" Style ="{DynamicResource RoundedBox}" Name="listBox1" Background="DarkSeaGreen" Foreground="Yellow" SelectionChanged="listBox1_SelectionChanged" >

in ResourceDicationary WPF.XAML
<Style x:Key="RoundedBox" TargetType="{x:Type ListBox}">
<Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" />
<Setter Property="BorderThickness" Value="3"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="0,0,1,1"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListBox}">
<Border CornerRadius="5,5,5,5" BorderThickness="1,1,1,1" RenderTransformOrigin="0.5,0.5" x:Name="border" BorderBrush="#FFFFFFFF">
<Border.RenderTransform>
<TransformGroup>
<ScaleTransform ScaleX="1" ScaleY="1"/>
<SkewTransform AngleX="0" AngleY="0"/>
<RotateTransform Angle="0"/>
<TranslateTransform X="0" Y="0"/>
</TransformGroup>
</Border.RenderTransform>
</Border>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>

Finally i got the rounded edge but..the background colr has gone and now it is transparent.
What im missing?Im new to WPF.Pls help me.
Before inclcuidn resourcedictionary in XAML,it shows the clor.After i inserted the line
Style ="{DynamicResource RoundedBox}" ..the colrs goes but i get rounded edge listbox.
AnswerRe: Rounded ListBox Pin
Mark Salsbery9-Dec-09 20:09
Mark Salsbery9-Dec-09 20:09 
GeneralRe: Rounded ListBox Pin
shanmugarajaa9-Dec-09 22:13
shanmugarajaa9-Dec-09 22:13 
GeneralRe: Rounded ListBox Pin
Mark Salsbery10-Dec-09 6:34
Mark Salsbery10-Dec-09 6:34 
QuestionWPF OpenFileDialog and FolderBrowserDialog Pin
ausadmin9-Dec-09 8:47
ausadmin9-Dec-09 8:47 
AnswerRe: WPF OpenFileDialog and FolderBrowserDialog Pin
Mark Salsbery9-Dec-09 10:22
Mark Salsbery9-Dec-09 10:22 
GeneralRe: WPF OpenFileDialog and FolderBrowserDialog Pin
Pete O'Hanlon9-Dec-09 10:59
mvePete O'Hanlon9-Dec-09 10:59 
GeneralRe: WPF OpenFileDialog and FolderBrowserDialog Pin
ausadmin31-Jan-10 10:04
ausadmin31-Jan-10 10:04 
QuestionMVVM newbie question - this doesn't seem to work with databinding Pin
Judah Gabriel Himango9-Dec-09 7:37
sponsorJudah Gabriel Himango9-Dec-09 7:37 
AnswerRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Ian Shlasko9-Dec-09 8:10
Ian Shlasko9-Dec-09 8:10 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Judah Gabriel Himango9-Dec-09 8:11
sponsorJudah Gabriel Himango9-Dec-09 8:11 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Ian Shlasko9-Dec-09 8:14
Ian Shlasko9-Dec-09 8:14 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Judah Gabriel Himango9-Dec-09 11:02
sponsorJudah Gabriel Himango9-Dec-09 11:02 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Ian Shlasko9-Dec-09 11:31
Ian Shlasko9-Dec-09 11:31 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Judah Gabriel Himango9-Dec-09 11:34
sponsorJudah Gabriel Himango9-Dec-09 11:34 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Ian Shlasko9-Dec-09 13:08
Ian Shlasko9-Dec-09 13:08 
AnswerRe: MVVM newbie question - this doesn't seem to work with databinding Pin
Pete O'Hanlon9-Dec-09 10:11
mvePete O'Hanlon9-Dec-09 10:11 
GeneralRe: MVVM newbie question - this doesn't seem to work with databinding [modified] Pin
Judah Gabriel Himango9-Dec-09 10:59
sponsorJudah Gabriel Himango9-Dec-09 10:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.