Click here to Skip to main content
15,894,825 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF custom Control delete event name Pin
User 2710096-Jul-09 9:24
User 2710096-Jul-09 9:24 
GeneralRe: WPF custom Control delete event name Pin
User 2710097-Jul-09 21:47
User 2710097-Jul-09 21:47 
GeneralRe: WPF custom Control delete event name Pin
Vinod C S8-Jul-09 0:23
Vinod C S8-Jul-09 0:23 
QuestionPlease help DataTemplate Pin
Member 40708152-Jul-09 3:53
Member 40708152-Jul-09 3:53 
AnswerRe: Please help DataTemplate Pin
Pete O'Hanlon2-Jul-09 4:02
mvePete O'Hanlon2-Jul-09 4:02 
QuestionHow can i make Expander control to expand both side Pin
wasimsharp1-Jul-09 21:36
wasimsharp1-Jul-09 21:36 
AnswerRe: How can i make Expander control to expand both side Pin
User 2710093-Jul-09 13:52
User 2710093-Jul-09 13:52 
QuestionSet the margin for Listbox Pin
member271-Jul-09 21:34
member271-Jul-09 21:34 
Hi all,

I want to create twolist box ,one in left side and other in right side in runtime.I wrote one code but i cant set the correct margin
can any one help me.. here is my source code..
in xaml code:

<StackPanel x:Name="stkPnlCaption"

Orientation="Vertical" Height="500" Width="800">





</StackPanel>

in xaml.cs::


ListBox list = new ListBox();
list.Width = 200;
list.Height = 200;
list.Margin = new Thickness(148, 131, 0, 131);

list.HorizontalAlignment = HorizontalAlignment.Left ;
list.VerticalAlignment = VerticalAlignment .Top ;
stkPnlCaption.Children.Add(list);
CheckBox checkBox = new CheckBox();
checkBox.Content = "Yes" ;

list.Items.Add(checkBox);


ListBox list1 = new ListBox();
list1.Width = 200;
list1.Height = 200;
list1.Margin = new Thickness(298, 131, 280, 131);
list1.HorizontalAlignment = HorizontalAlignment.Right;
list1.VerticalAlignment = VerticalAlignment.Top;
stkPnlCaption.Children.Add(list1);
CheckBox checkBox1 = new CheckBox();
checkBox1.Content = "Yes" ;

list1.Items.Add(checkBox1);

i want the both the list box in same height and width ..one in left side and other in right side(paralley).
AnswerRe: Set the margin for Listbox Pin
Pete O'Hanlon2-Jul-09 3:33
mvePete O'Hanlon2-Jul-09 3:33 
QuestionVisual Studio XAML Editor Hotfix Pin
Mark Salsbery1-Jul-09 8:21
Mark Salsbery1-Jul-09 8:21 
QuestionXAML Editor Hotfix Pin
Mark Salsbery1-Jul-09 8:20
Mark Salsbery1-Jul-09 8:20 
QuestionWPF StackPanel and Children Pin
Gianluigi831-Jul-09 1:28
Gianluigi831-Jul-09 1:28 
Questionhow to use &lt; in the XAML coding.. Pin
Hema Bairavan1-Jul-09 1:21
Hema Bairavan1-Jul-09 1:21 
AnswerRe: how to use &lt; in the XAML coding.. Pin
Pete O'Hanlon1-Jul-09 1:54
mvePete O'Hanlon1-Jul-09 1:54 
Questionchange selected index of System.windows.controls Combobox from javascript code + silverlight Pin
Member 39813661-Jul-09 0:44
Member 39813661-Jul-09 0:44 
AnswerRe: change selected index of System.windows.controls Combobox from javascript code + silverlight Pin
Michael Sync23-Jul-09 20:15
Michael Sync23-Jul-09 20:15 
QuestionChange Color to Title Bar Pin
avi_dadi200230-Jun-09 22:56
avi_dadi200230-Jun-09 22:56 
AnswerRe: Change Color to Title Bar Pin
#realJSOP30-Jun-09 23:52
mve#realJSOP30-Jun-09 23:52 
GeneralRe: Change Color to Title Bar Pin
Mark Salsbery1-Jul-09 12:25
Mark Salsbery1-Jul-09 12:25 
AnswerRe: Change Color to Title Bar Pin
Mark Salsbery1-Jul-09 12:24
Mark Salsbery1-Jul-09 12:24 
Questiontv tuner and directShow Pin
gsipes30-Jun-09 3:09
gsipes30-Jun-09 3:09 
AnswerRe: tv tuner and directShow Pin
Christian Graus30-Jun-09 10:35
protectorChristian Graus30-Jun-09 10:35 
GeneralRe: tv tuner and directShow Pin
gsipes1-Jul-09 2:45
gsipes1-Jul-09 2:45 
GeneralRe: tv tuner and directShow Pin
BrowniePoints6-Jul-09 6:00
BrowniePoints6-Jul-09 6:00 
GeneralRe: tv tuner and directShow Pin
gsipes8-Jul-09 3:21
gsipes8-Jul-09 3:21 

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.