Click here to Skip to main content
15,914,014 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Help with deployement Pin
ToddHileHoffer25-Jan-10 14:57
ToddHileHoffer25-Jan-10 14:57 
GeneralRe: Help with deployement Pin
Mark Salsbery26-Jan-10 5:54
Mark Salsbery26-Jan-10 5:54 
GeneralRe: Help with deployement Pin
ToddHileHoffer26-Jan-10 6:00
ToddHileHoffer26-Jan-10 6:00 
GeneralRe: Help with deployement Pin
Mark Salsbery26-Jan-10 6:13
Mark Salsbery26-Jan-10 6:13 
QuestionWindows Live API Pin
TerRO_GirL25-Jan-10 0:17
TerRO_GirL25-Jan-10 0:17 
AnswerRe: Windows Live API Pin
Mark Salsbery25-Jan-10 6:33
Mark Salsbery25-Jan-10 6:33 
QuestionWPF Keyboard buffer Pin
User 151565624-Jan-10 11:43
User 151565624-Jan-10 11:43 
AnswerRe: WPF Keyboard buffer Pin
Super Lloyd24-Jan-10 17:52
Super Lloyd24-Jan-10 17:52 
QuestionNeed suggestions for developing Scrabble like game in WPF Pin
mittalpa23-Jan-10 9:35
mittalpa23-Jan-10 9:35 
AnswerRe: Need suggestions for developing Scrabble like game in WPF Pin
Pete O'Hanlon24-Jan-10 8:37
mvePete O'Hanlon24-Jan-10 8:37 
AnswerRe: Need suggestions for developing Scrabble like game in WPF Pin
AspDotNetDev25-Jan-10 12:10
protectorAspDotNetDev25-Jan-10 12:10 
QuestionWhat is DataContext in WPF ? Pin
Mohammad Dayyan23-Jan-10 2:48
Mohammad Dayyan23-Jan-10 2:48 
AnswerRe: What is DataContext in WPF ? Pin
Abhinav S23-Jan-10 3:13
Abhinav S23-Jan-10 3:13 
GeneralRe: What is DataContext in WPF ? Pin
Mohammad Dayyan23-Jan-10 3:55
Mohammad Dayyan23-Jan-10 3:55 
QuestionCross-thread Calls on UI Elements Pin
Richard Andrew x6422-Jan-10 15:58
professionalRichard Andrew x6422-Jan-10 15:58 
AnswerRe: Cross-thread Calls on UI Elements Pin
Eslam Afifi22-Jan-10 23:03
Eslam Afifi22-Jan-10 23:03 
QuestionHow to create a custom display of items in WPF? Pin
darthBug22-Jan-10 8:03
darthBug22-Jan-10 8:03 
AnswerRe: How to create a custom display of items in WPF? Pin
hb5213421422-Jan-10 8:38
hb5213421422-Jan-10 8:38 
QuestionNeed to dynamically size width of ListBox.ItemsPanel Pin
fjparisIII21-Jan-10 17:48
fjparisIII21-Jan-10 17:48 
AnswerRe: Need to dynamically size width of ListBox.ItemsPanel Pin
Gideon Engelberth22-Jan-10 5:33
Gideon Engelberth22-Jan-10 5:33 
GeneralRe: Need to dynamically size width of ListBox.ItemsPanel Pin
fjparisIII22-Jan-10 6:52
fjparisIII22-Jan-10 6:52 
Thanks for your suggestion. It's certainly better than I originally had, and I don't quite understand what ScrollContentPresenter has to do with it. But your suggestion only works if I make the containing dialog wider. As I stretch the dialog horizontally, the WrapPanel's width does increase with the width of the dialog and the height of the WrapPanel automatically decreases, but if I make the width of the dialog smaller, the WrapPanel's width and height stays where it was at its widest value and ListBoxItems get truncated to the right within the WrapPanel. What I expected to happen as the dialog width got smaller was the height of the WrapPanel to increase and its width to decrease to accommodate all the ListBoxItems so that they all always remain fully visible.

Perhaps it would help you to find the solution to the remaining problem if you saw my entire XAML file. As you can see, it's actually a UserControl that is used multiple times within a containing dialog.

<UserControl x:Class="CustomControls.HorizontalListBox"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Loaded="UserControl_Loaded"
    >
    <Border
        BorderThickness="2"
        BorderBrush="DarkBlue"
        CornerRadius="3"
        >
        <ScrollViewer
            Name="scrollViewer"
            MaxHeight="68"
            VerticalAlignment="Top"
            VerticalScrollBarVisibility="Auto"
            HorizontalScrollBarVisibility="Hidden"
            >
            <ListBox
                Name="listBox"
                BorderThickness="0" 
                SelectionMode="Extended"
                KeyUp="listBox_KeyUp"
                SelectionChanged="listBox_SelectionChanged"
                >
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel
                            Name="wrapPanel"
                            MinHeight="17"
                            Width="{Binding ActualWidth,
                                            RelativeSource=
                                                {RelativeSource AncestorType={x:Type ScrollContentPresenter}}}"
                            IsItemsHost="True"
                            Orientation="Horizontal"
                            HorizontalAlignment="Left"
                            >
                        </WrapPanel>
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
        </ScrollViewer>
    </Border>
</UserControl>

GeneralRe: Need to dynamically size width of ListBox.ItemsPanel Pin
hb5213421422-Jan-10 7:33
hb5213421422-Jan-10 7:33 
GeneralRe: Need to dynamically size width of ListBox.ItemsPanel Pin
fjparisIII22-Jan-10 8:43
fjparisIII22-Jan-10 8:43 
GeneralRe: Need to dynamically size width of ListBox.ItemsPanel Pin
hb5213421422-Jan-10 9:45
hb5213421422-Jan-10 9:45 
GeneralRe: Need to dynamically size width of ListBox.ItemsPanel Pin
fjparisIII22-Jan-10 12:32
fjparisIII22-Jan-10 12:32 

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.