Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
170
In "OutlookBargroup", for "IsSelected" property do we need to specify "UpdateSourceTrigger" and "Mode" as well explicitly?
posted

My code is as below

            <igOutlookBar:OutlookBarGroup Header="All Requests"
                                          LargeImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20All%20Requests.png"
                                          SmallImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20All%20Requests.png"
                                          IsSelected="{Binding Is_igOutlookBar_AllRequestsSelected}">
I have 3 outlookbargroup defined withing "XamOutlookbar". My selections are not retrieved sometimes. For example,
I have the following three outlookbargroup
<igOutlookBar:XamOutlookBar Grid.Column="0"
                                    Grid.Row="0"
                                    Grid.RowSpan="2"
                                    IsMinimized="{Binding OutlookBarExpansion, Mode=TwoWay}"
                                    Background="#FF9CAAC1"
                                    BorderBrush="#FF9CAAC1"
                                    Foreground="#FF9CAAC1"
                                    OpacityMask="#FF9CAAC1"
                                    VerticalSplitterLocation="Right">
            <igOutlookBar:OutlookBarGroup Header="My Requests"
                                          LargeImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20My%20Requests.png"
                                          SmallImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20My%20Requests.png" 
                                          IsSelected="{Binding Is_igOutlookBar_MyRequestsSelected}">
                <mvvm:CommandBehaviorCollection.Behaviors>
                    <mvvm:BehaviorBinding Command="{Binding outlookBarItemClick}"
                                          CommandParameter="My Requests"
                                          Event="MouseLeftButtonDown"></mvvm:BehaviorBinding>
                </mvvm:CommandBehaviorCollection.Behaviors>
                
            </igOutlookBar:OutlookBarGroup>
            <igOutlookBar:OutlookBarGroup Header="Tasks"
                                          LargeImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20Tasks.png"
                                          SmallImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20Tasks.png"
                                          IsSelected="{Binding Is_igOutlookBar_TasksSelected}">
                
                <mvvm:CommandBehaviorCollection.Behaviors>
                    <mvvm:BehaviorBinding Command="{Binding outlookBarItemClick}"
                                          CommandParameter="Tasks"
                                          Event="MouseLeftButtonDown"></mvvm:BehaviorBinding>
                </mvvm:CommandBehaviorCollection.Behaviors>
 
            </igOutlookBar:OutlookBarGroup>
            <igOutlookBar:OutlookBarGroup Header="All Requests"
                                          LargeImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20All%20Requests.png"
                                          SmallImage="/ToolTimeScheduler;component/Resources/Images/Outlook%20All%20Requests.png"
                                          IsSelected="{Binding Is_igOutlookBar_AllRequestsSelected}">
                <mvvm:CommandBehaviorCollection.Behaviors>
                    <mvvm:BehaviorBinding Command="{Binding outlookBarItemClick}"
                                          CommandParameter="All Requests"
                                          Event="MouseLeftButtonDown"></mvvm:BehaviorBinding>
                </mvvm:CommandBehaviorCollection.Behaviors>
            </igOutlookBar:OutlookBarGroup>
 
        </igOutlookBar:XamOutlookBar>
If suppose my default selection is "All Requests" and when I click on "Tasks", the value for the property, Is_igOutlookBar_TasksSelected, in viewmodel 
changes but the selection is not reflected in view sometimes; it works sometimes.
 
Do I need to specify the "IsSelected" property as follow or is there anything I am missing?
 
IsSelected="{Binding Is_igOutlookBar_MyRequestsSelected, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}
Thank you! :) 
  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I can say that in most cases the Default values for UpdateSourceTrigger and Mode are PropertyChanged and TwoWay, each Property can set them differently, so I suggest you set them explicitly to be sure that they are set to the values you want.

     

    Hope this helps you.