Click here to Skip to main content
15,891,033 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: How to got Phone Number Pin
Pete O'Hanlon14-Aug-12 22:20
mvePete O'Hanlon14-Aug-12 22:20 
AnswerRe: How to got Phone Number Pin
Abhinav S14-Aug-12 23:08
Abhinav S14-Aug-12 23:08 
QuestionNeed to call third party API from SL 5 Solution Pin
Tbhavesh14-Aug-12 9:03
Tbhavesh14-Aug-12 9:03 
AnswerRe: Need to call third party API from SL 5 Solution Pin
Wes Aday14-Aug-12 9:47
professionalWes Aday14-Aug-12 9:47 
AnswerRe: Need to call third party API from SL 5 Solution Pin
Anumeha Shukla16-Aug-12 2:49
Anumeha Shukla16-Aug-12 2:49 
QuestionCrop and save image in oval shape using silverlight Pin
Anupbala13-Aug-12 19:20
Anupbala13-Aug-12 19:20 
AnswerRe: Crop and save image in oval shape using silverlight Pin
Pete O'Hanlon13-Aug-12 23:04
mvePete O'Hanlon13-Aug-12 23:04 
QuestionWPF ComboBox Binding Problem Pin
Kevin Marois12-Aug-12 10:51
professionalKevin Marois12-Aug-12 10:51 
I have an Address entity:

public class AddressEntity : _EntityBase
{
    public AddressTypeEntity AddressType { get; set; }
    public string Street1 { get; set; }
    public string Street2 { get; set; }
    public string City { get; set; }
    public string State { get; set; }
    public string ZipCode { get; set; }
    public bool IsPrimary { get; set; }
    public string DisplayValue { get; set; }
}


On the Address Edit dialod I have a combo box of AddressTypes. It's bound to an ObservableCollection of AddressTypeEntity. I can see the address types when I drop down the list.

Here's the AddressTypeEntity
public class AddressTypeEntity : _EntityBase
{
    public string Caption { get; set; }
}


Pretty simple so far.

The problem is that the Caption is not showing in the drop down. Here's the XAML for the combobox:

<ComboBox x:Name="Types" 
            Grid.Row="2"
            Grid.Column="1"
            ItemsSource="{Binding AddressTypes}"
            SelectedItem="{Binding SelectedAddressType, Mode=TwoWay}"
            Margin="5,0,0,0"
            VerticalAlignment="Center"
            HorizontalAlignment="Left"
            FontFamily="Segoe UI"
            FontSize="14"
            Foreground="DarkSlateGray"
            Width="140">
    <ComboBox.ItemTemplate>
        <DataTemplate>
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding Address.AddressType.Caption}"/>
            </StackPanel>
        </DataTemplate>
    </ComboBox.ItemTemplate>
</ComboBox>


I'm pretty sure that the problem is in the template, I just can't see what I'm doing wrong.

Anyone?
If it's not broken, fix it until it is

AnswerRe: WPF ComboBox Binding Problem Pin
Pete O'Hanlon12-Aug-12 11:22
mvePete O'Hanlon12-Aug-12 11:22 
GeneralRe: WPF ComboBox Binding Problem Pin
Kevin Marois12-Aug-12 11:40
professionalKevin Marois12-Aug-12 11:40 
GeneralRe: WPF ComboBox Binding Problem Pin
Pete O'Hanlon13-Aug-12 4:08
mvePete O'Hanlon13-Aug-12 4:08 
GeneralRe: WPF ComboBox Binding Problem Pin
Kevin Marois12-Aug-12 11:47
professionalKevin Marois12-Aug-12 11:47 
QuestionTreeView Control Item Styling Pin
Andy_L_J12-Aug-12 2:38
Andy_L_J12-Aug-12 2:38 
AnswerRe: TreeView Control Item Styling Pin
SledgeHammer0113-Aug-12 10:25
SledgeHammer0113-Aug-12 10:25 
GeneralGroupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru8-Aug-12 23:24
karthik bandaru8-Aug-12 23:24 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:06
Ed Hill _5_9-Aug-12 0:06 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:23
karthik bandaru9-Aug-12 0:23 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:31
Ed Hill _5_9-Aug-12 0:31 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:42
karthik bandaru9-Aug-12 0:42 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:56
Ed Hill _5_9-Aug-12 0:56 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 0:47
Ed Hill _5_9-Aug-12 0:47 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 0:50
karthik bandaru9-Aug-12 0:50 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
karthik bandaru9-Aug-12 2:10
karthik bandaru9-Aug-12 2:10 
GeneralRe: Groupbox visibility problem in WPF after debugging and changing the combobox value Pin
Ed Hill _5_9-Aug-12 2:24
Ed Hill _5_9-Aug-12 2:24 
SuggestionRegarding MVVM framework for WPF Pin
Member 92251325-Aug-12 3:55
Member 92251325-Aug-12 3:55 

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.