Click here to Skip to main content
15,879,490 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Dividing a TextBox into columns Pin
Dwayne Barsotta27-Jan-18 6:24
Dwayne Barsotta27-Jan-18 6:24 
AnswerRe: Dividing a TextBox into columns Pin
Gerry Schmitz7-Jan-18 7:26
mveGerry Schmitz7-Jan-18 7:26 
AnswerRe: Dividing a TextBox into columns Pin
Kenneth Haugland7-Jan-18 17:41
mvaKenneth Haugland7-Jan-18 17:41 
AnswerRe: Dividing a TextBox into columns Pin
Dwayne Barsotta27-Jan-18 6:39
Dwayne Barsotta27-Jan-18 6:39 
GeneralRe: Dividing a TextBox into columns Pin
Gerry Schmitz27-Jan-18 12:47
mveGerry Schmitz27-Jan-18 12:47 
QuestionProblems pausing and restarting animations in XAML Pin
Kenneth Haugland6-Jan-18 0:52
mvaKenneth Haugland6-Jan-18 0:52 
AnswerRe: Problems pausing and restarting animations in XAML Pin
Gerry Schmitz6-Jan-18 7:48
mveGerry Schmitz6-Jan-18 7:48 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Kenneth Haugland6-Jan-18 8:09
mvaKenneth Haugland6-Jan-18 8:09 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Gerry Schmitz6-Jan-18 8:26
mveGerry Schmitz6-Jan-18 8:26 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Kenneth Haugland6-Jan-18 8:41
mvaKenneth Haugland6-Jan-18 8:41 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Gerry Schmitz6-Jan-18 8:51
mveGerry Schmitz6-Jan-18 8:51 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Kenneth Haugland6-Jan-18 9:17
mvaKenneth Haugland6-Jan-18 9:17 
GeneralRe: Problems pausing and restarting animations in XAML Pin
Gerry Schmitz6-Jan-18 9:32
mveGerry Schmitz6-Jan-18 9:32 
QuestionWPF Pin
Bogadamidi3-Jan-18 16:20
Bogadamidi3-Jan-18 16:20 
AnswerRe: WPF Pin
Kenneth Haugland3-Jan-18 18:31
mvaKenneth Haugland3-Jan-18 18:31 
QuestionBegin a storyboard in a ControlTemplate Pin
Kenneth Haugland1-Jan-18 22:28
mvaKenneth Haugland1-Jan-18 22:28 
AnswerRe: Begin a storyboard in a ControlTemplate Pin
Pete O'Hanlon2-Jan-18 0:55
mvePete O'Hanlon2-Jan-18 0:55 
GeneralRe: Begin a storyboard in a ControlTemplate Pin
Kenneth Haugland2-Jan-18 3:35
mvaKenneth Haugland2-Jan-18 3:35 
GeneralRe: Begin a storyboard in a ControlTemplate Pin
Pete O'Hanlon2-Jan-18 4:38
mvePete O'Hanlon2-Jan-18 4:38 
AnswerRe: Begin a storyboard in a ControlTemplate Pin
Pete O'Hanlon2-Jan-18 6:11
mvePete O'Hanlon2-Jan-18 6:11 
GeneralRe: Begin a storyboard in a ControlTemplate Pin
Kenneth Haugland2-Jan-18 6:41
mvaKenneth Haugland2-Jan-18 6:41 
GeneralRe: Begin a storyboard in a ControlTemplate Pin
Pete O'Hanlon2-Jan-18 7:49
mvePete O'Hanlon2-Jan-18 7:49 
QuestionComboBoxEdit Control Pin
Kevin Marois21-Dec-17 6:09
professionalKevin Marois21-Dec-17 6:09 
I'm working on a ComboBoxEdit Control

I got the idea from this.

The trick was to add to the buttons to control template. No problem there.

So to use it I have:
XAML
<cbe:ComboBoxEdit Height="32"
                    Width="350"
                    ItemsSource="{Binding Items}"
                    SelectedItem="{Binding SelectedItem}"
                    PopupFooterButtons="OkCancel"
                    VerticalAlignment="Top"
                    Margin="5,20,0,0">

<pre>
<ComboBox.ItemTemplate>

    <DataTemplate>
        <StackPanel Orientation="Horizontal">
            <CheckBox IsChecked="{Binding IsItemChecked}"
                        Margin="2"/>
            <TextBlock Text="{Binding Caption}"
                        Margin="2"/>
        </StackPanel>
    </DataTemplate>

</ComboBox.ItemTemplate>



Code Behind
public MainWindow()
{
    InitializeComponent();
    this.DataContext = this;
    Items = new ObservableCollection<Item>
    {
        new Item
        {
            Caption = "Awarded",
            IsItemChecked = false
        },
        new Item
        {
            Caption = "Bidding",
            IsItemChecked = true
        },
        new Item
        {
            Caption = "Cancelled",
            IsItemChecked = false
        },
        new Item
        {
            Caption = "Completed",
            IsItemChecked = false
        },
        new Item
        {
            Caption = "In Progress",
            IsItemChecked = true
        },
        new Item
        {
            Caption = "On Hold",
            IsItemChecked = false
        }
    };
}
So far all works awesome.

So here's the question. What I want to do track what items are checked. Selected and checked are not the same thing. Selected it whem the item's row is selected, where checked is when the checkbox value is set. Then, when the user clicks Ok I'm going to populate a list of selected items.

The problems is how does the control know about the list of items bound to it? How does the control ever know that there a bool property called "IsItemChecked" on the data class?
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.

AnswerRe: ComboBoxEdit Control Pin
Kenneth Haugland1-Jan-18 23:16
mvaKenneth Haugland1-Jan-18 23:16 
QuestionVB.Net/WPF/XAML "The video does not load via the executable." Pin
Member 1358548219-Dec-17 13:20
Member 1358548219-Dec-17 13:20 

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.