Click here to Skip to main content
15,893,663 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: Button sizes become small in a stackpanel Pin
Abhishek Sur20-Apr-13 1:46
professionalAbhishek Sur20-Apr-13 1:46 
GeneralRe: Button sizes become small in a stackpanel Pin
Vimalsoft(Pty) Ltd21-Apr-13 3:08
professionalVimalsoft(Pty) Ltd21-Apr-13 3:08 
GeneralRe: Button sizes become small in a stackpanel Pin
Abhishek Sur21-Apr-13 11:20
professionalAbhishek Sur21-Apr-13 11:20 
GeneralRe: Button sizes become small in a stackpanel Pin
Vimalsoft(Pty) Ltd22-Apr-13 1:27
professionalVimalsoft(Pty) Ltd22-Apr-13 1:27 
Questionlistview with many textboxes Pin
vaishali thaker11-Apr-13 22:50
vaishali thaker11-Apr-13 22:50 
AnswerRe: listview with many textboxes Pin
Abhinav S12-Apr-13 0:01
Abhinav S12-Apr-13 0:01 
AnswerRe: listview with many textboxes Pin
vaishali thaker15-Apr-13 1:16
vaishali thaker15-Apr-13 1:16 
QuestionWPF ComboBox From Enum - Filter List Pin
Kevin Marois11-Apr-13 19:31
professionalKevin Marois11-Apr-13 19:31 
I have this enum bound to a combo:

public enum BOMStatuses
{
    [Description("Cancel")]
    Cancel,

    [Description("Cancelled")]
    Cancelled,

    [Description("Hold")]
    Hold,

    [Description("Priced")]
    Priced,
        
    [Description("Rejected With Reason")]
    RejectedWithReason,

    [Description("To Be Delivered")]
    ToBeDelivered,

    [Description("To Be Priced")]
    ToBePriced,

    [Description("To Be Ordered")]
    ToBeOrdered
}


It's bound in the view like this:

<Window.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="..\Resources.xaml"/>
        </ResourceDictionary.MergedDictionaries>

        
        <ObjectDataProvider x:Key="BOMStatusList" 
                            MethodName="GetValues" 
                            ObjectType="{x:Type entity_enums:MaterialType}">
            <ObjectDataProvider.MethodParameters>
                <x:Type TypeName="entity_enums:BOMStatuses"/>
            </ObjectDataProvider.MethodParameters>
        </ObjectDataProvider>
        <converters:BOMStatusToDescriptionConverter x:Key="BOMStatusToDescConverter"/>            
            

    </ResourceDictionary>
</Window.Resources>


and

<ComboBox Grid.Row="2"
            Grid.Column="1"
            TabIndex="0"
            ItemsSource="{Binding Source={StaticResource BOMStatusList}}"
            SelectedValue="{Binding SelectedBOMStatus}"
            SelectedIndex="{Binding StatusIndex}"
            Style="{StaticResource ComboBoxStyle}"
            VerticalAlignment="Center"
            HorizontalAlignment="Left"
            Margin="0,20,20,2"
            Width="250">
    <ComboBox.ItemTemplate>
        <DataTemplate>
            <TextBlock Text="{Binding Converter={StaticResource BOMStatusToDescConverter}}"/>
        </DataTemplate>
    </ComboBox.ItemTemplate>
</ComboBox>


In certain cases I only want to show 2 of the enum values. How can I filter this list of enum values?

Thanks
If it's not broken, fix it until it is

AnswerRe: WPF ComboBox From Enum - Filter List Pin
Mycroft Holmes13-Apr-13 13:24
professionalMycroft Holmes13-Apr-13 13:24 
GeneralRe: WPF ComboBox From Enum - Filter List Pin
SledgeHammer0113-Apr-13 14:48
SledgeHammer0113-Apr-13 14:48 
GeneralRe: WPF ComboBox From Enum - Filter List Pin
Mycroft Holmes13-Apr-13 20:36
professionalMycroft Holmes13-Apr-13 20:36 
GeneralRe: WPF ComboBox From Enum - Filter List Pin
SledgeHammer0113-Apr-13 20:42
SledgeHammer0113-Apr-13 20:42 
QuestionMaintain WPF Window Size across different resolution monitors Pin
Vimalsoft(Pty) Ltd9-Apr-13 23:47
professionalVimalsoft(Pty) Ltd9-Apr-13 23:47 
AnswerRe: Maintain WPF Window Size across different resolution monitors Pin
Jason Gleim11-Apr-13 10:11
professionalJason Gleim11-Apr-13 10:11 
GeneralRe: Maintain WPF Window Size across different resolution monitors Pin
Vimalsoft(Pty) Ltd11-Apr-13 10:17
professionalVimalsoft(Pty) Ltd11-Apr-13 10:17 
QuestionAsynchronous Design Issue Pin
Mycroft Holmes8-Apr-13 16:13
professionalMycroft Holmes8-Apr-13 16:13 
AnswerRe: Asynchronous Design Issue Pin
SledgeHammer018-Apr-13 18:44
SledgeHammer018-Apr-13 18:44 
GeneralRe: Asynchronous Design Issue Pin
Mycroft Holmes8-Apr-13 19:12
professionalMycroft Holmes8-Apr-13 19:12 
GeneralRe: Asynchronous Design Issue Pin
SledgeHammer018-Apr-13 19:15
SledgeHammer018-Apr-13 19:15 
GeneralRe: Asynchronous Design Issue Pin
Mycroft Holmes8-Apr-13 19:27
professionalMycroft Holmes8-Apr-13 19:27 
AnswerRe: Asynchronous Design Issue Pin
Abhinav S8-Apr-13 23:23
Abhinav S8-Apr-13 23:23 
GeneralRe: Asynchronous Design Issue Pin
Mycroft Holmes9-Apr-13 2:44
professionalMycroft Holmes9-Apr-13 2:44 
QuestionHow to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 20:00
Shwetank1237-Apr-13 20:00 
AnswerRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Naz_Firdouse7-Apr-13 21:18
Naz_Firdouse7-Apr-13 21:18 
GeneralRe: How to Set ItemSource of Autocomplete Textbox when placed inside Datagrid and that datagrid having multiple rows??? Pin
Shwetank1237-Apr-13 21:27
Shwetank1237-Apr-13 21:27 

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.