Click here to Skip to main content
15,392,472 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: What's the best control for ..... Pin
Pete O'Hanlon14-Mar-12 5:24
mvaPete O'Hanlon14-Mar-12 5:24 
GeneralRe: What's the best control for ..... Pin
Sutton Mehaffey14-Mar-12 6:58
MemberSutton Mehaffey14-Mar-12 6:58 
GeneralRe: What's the best control for ..... Pin
Pete O'Hanlon14-Mar-12 7:02
mvaPete O'Hanlon14-Mar-12 7:02 
GeneralRe: What's the best control for ..... Pin
Sutton Mehaffey14-Mar-12 10:12
MemberSutton Mehaffey14-Mar-12 10:12 
GeneralRe: What's the best control for ..... Pin
Pete O'Hanlon14-Mar-12 10:25
mvaPete O'Hanlon14-Mar-12 10:25 
GeneralRe: What's the best control for ..... Pin
Sutton Mehaffey14-Mar-12 10:44
MemberSutton Mehaffey14-Mar-12 10:44 
GeneralRe: What's the best control for ..... Pin
Pete O'Hanlon14-Mar-12 10:50
mvaPete O'Hanlon14-Mar-12 10:50 
GeneralRe: What's the best control for ..... Pin
Sutton Mehaffey21-Mar-12 18:52
MemberSutton Mehaffey21-Mar-12 18:52 
Pete,

I took a different approach. I'm trying to create a ListBox on the fly without using any XAML code. I got it working - almost. What I have is an array of TextBoxes of 'Zone Descriptions'. I can put those into the ListBox as ListBoxItems, and it works great - no problem.

I want to add at the front of the TextBox a TextBlock or header that says 'Zone 1' or whatever the zone is along with the TextBox, which is user changeable. I have an array of TextBlocks. But, I can't (or don't know how to) adjust the ListBoxItem.Content to hold both the TextBlock and TextBox combo. LBI[i].Content = TBlkZoneDesc[i] + TBxZoneDesc[i] is what I want to do, but that syntax is not allowed. Doing either one separately works fine, but not both.

Do you have a suggestion on how to do that?

Sutton

ListBox LBZoneDesc = new ListBox();
LBZoneDesc.Width = 300;
LBZoneDesc.Height = 240;
Grid.SetColumn(LBZoneDesc,0);
Grid.SetRow(LBZoneDesc,2);

ListBoxItem[] LBI = new ListBoxItem[64];
for (byte i = 0; i < 5; i++)
{
    LBI[i] = new ListBoxItem();
    LBI[i].Padding = new Thickness(2);
    // LBI[i].Content = TBlkZoneDesc[i];
    LBI[i].Content = TBxZoneDesc[i];
    LBZoneDesc.Items.Add(LBI[i]);
}
C0Grid.Children.Add(LBZoneDesc);

QuestionFlip page animation.Again. Pin
demolexpert13-Mar-12 7:40
Memberdemolexpert13-Mar-12 7:40 
Questionunable to access parent property from a Trigger Pin
George Nistor13-Mar-12 7:15
MemberGeorge Nistor13-Mar-12 7:15 
QuestionBinding Fill property to value of node with particular id in XML Pin
Mahesha99912-Mar-12 21:32
MemberMahesha99912-Mar-12 21:32 
Questioninteraction between Models in PRISM V4 (WPF) Pin
radhwane12-Mar-12 13:09
Memberradhwane12-Mar-12 13:09 
Questiondefining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 3:37
MemberSutton Mehaffey12-Mar-12 3:37 
AnswerRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 3:42
mvaPete O'Hanlon12-Mar-12 3:42 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 4:50
MemberSutton Mehaffey12-Mar-12 4:50 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 4:51
MemberSutton Mehaffey12-Mar-12 4:51 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 4:52
MemberSutton Mehaffey12-Mar-12 4:52 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 4:59
mvaPete O'Hanlon12-Mar-12 4:59 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 5:15
MemberSutton Mehaffey12-Mar-12 5:15 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 5:22
mvaPete O'Hanlon12-Mar-12 5:22 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 5:32
MemberSutton Mehaffey12-Mar-12 5:32 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey12-Mar-12 15:33
MemberSutton Mehaffey12-Mar-12 15:33 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon12-Mar-12 22:32
mvaPete O'Hanlon12-Mar-12 22:32 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Sutton Mehaffey13-Mar-12 2:52
MemberSutton Mehaffey13-Mar-12 2:52 
GeneralRe: defining a grid row within a grid column, wpf, c# Pin
Pete O'Hanlon13-Mar-12 3:11
mvaPete O'Hanlon13-Mar-12 3:11 

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.