<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: mutual exclusion checkboxes in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321097#M10225</link>
    <description>&lt;P&gt;I changed the target in the daml-file and can run the souluton.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2023 12:25:28 GMT</pubDate>
    <dc:creator>Daniel4</dc:creator>
    <dc:date>2023-08-22T12:25:28Z</dc:date>
    <item>
      <title>mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320634#M10211</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I want to implement two check boxes there are&amp;nbsp;mutual exclusion. If box one are checked to true, box two must automatic turn to false. I have the two checkboxes in a dockpan.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Daniel4_0-1692621847030.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/78665iDB3D503FA666B829/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Daniel4_0-1692621847030.png" alt="Daniel4_0-1692621847030.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far.&lt;/P&gt;&lt;P&gt;xaml:&lt;/P&gt;&lt;LI-CODE lang="markdown"&gt; &amp;lt;CheckBox
    Margin="5"
    Style="{DynamicResource Esri_CheckboxToggleSwitch}"
    Name="CheckBox_One"
    IsChecked="{Binding IsCheckedBoxOne}"&amp;gt;
    &amp;lt;TextBlock&amp;gt;
    &amp;lt;Run Text="BoxOne"/&amp;gt;
    &amp;lt;/TextBlock&amp;gt;                
    &amp;lt;/CheckBox&amp;gt;

&amp;lt;CheckBox
     Margin="5"
     Style="{DynamicResource Esri_CheckboxToggleSwitch}"
     Name="CheckBox_Two"
     IsChecked="{Binding IsCheckedBoxTwo}"&amp;gt;
     &amp;lt;TextBlock&amp;gt;
     &amp;lt;Run Text="BoxTwo"/&amp;gt;
     &amp;lt;/TextBlock&amp;gt;
&amp;lt;/CheckBox&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;c#:&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private bool _isCheckedBoxOne;
private bool _isCheckedBoxTwo;

public bool IsCheckedBoxOne
       {
         get { return _isCheckedBoxOne; }
         set
            {               
                SetProperty(ref _isCheckedBoxOne, value);               
             }
         }        

public bool IsCheckedBoxTwo
        {
            get { return _isCheckedBoxTwo; }
            set
            {
               SetProperty(ref _isCheckedBoxTwo, value);
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How to implement the logic?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 12:51:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320634#M10211</guid>
      <dc:creator>Daniel4</dc:creator>
      <dc:date>2023-08-21T12:51:09Z</dc:date>
    </item>
    <item>
      <title>Re: mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320670#M10214</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;There is no logic implemented in your code between IsCheckedOne and IsCheckedTwo properties.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private bool _isCheckedBoxOne;
private bool _isCheckedBoxTwo;

public bool IsCheckedBoxOne
       {
         get { return _isCheckedBoxOne; }
         set
            {         
                SetProperty(ref _isCheckedBoxOne, value);               
                _isCheckedBoxTwo = !_isCheckedBoxOne; 
                // Generate notification message here to update _isCheckBoxTwo, it could differ from that sample
               OnPropertyChanged("IsCheckedBoxTwo");
             }
         }        

public bool IsCheckedBoxTwo
        {
            get { return _isCheckedBoxTwo; }
            set
            {
               SetProperty(ref _isCheckedBoxTwo, value);
                _isCheckedBoxOne = !_isCheckedBoxTwo; 
                // Generate notification message here to update _isCheckBoxOne, it could differ from that sample
               OnPropertyChanged("IsCheckedBoxOne");
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;It is enough one property for both controls, but you need to use boolean inverting converter in second property binding.&lt;/P&gt;&lt;P&gt;Question like yours is not a scope of ArcGIS Pro. It is WPF part.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:58:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320670#M10214</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2023-08-21T13:58:06Z</dc:date>
    </item>
    <item>
      <title>Re: mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320788#M10217</link>
      <description>&lt;P&gt;If you implement your checkbox logic in the viewmodel as&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/42133"&gt;@GKmieliauskas&lt;/a&gt;&amp;nbsp; suggests you have to prevent recursion when you set the counter property.&amp;nbsp; Here is my suggestion (i attached a sample solution)&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;private bool _isCheckedOne;
    private bool _isCheckedTwo;

    public bool IsCheckedOne
    {
      get { return _isCheckedOne; }
      set
      {
        SetProperty(ref _isCheckedOne, value);
        if (IsCheckedTwo == IsCheckedOne)
        {
          // prevent recursion
          IsCheckedTwo = !IsCheckedOne;
        }
      }
    }

    public bool IsCheckedTwo
    {
      get { return _isCheckedTwo; }
      set
      {
        SetProperty(ref _isCheckedTwo, value);
        if (IsCheckedOne == IsCheckedTwo)
        {
          // prevent recursion
          IsCheckedOne = !IsCheckedTwo;
        }
      }
    }&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1320788#M10217</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-08-21T16:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321027#M10222</link>
      <description>&lt;P&gt;Hi, thanks for the answer both of you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I try both, and it works for me.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/12882"&gt;@Wolf&lt;/a&gt;&amp;nbsp;I tried the sample solution, but its target AGO 3.2 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 08:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321027#M10222</guid>
      <dc:creator>Daniel4</dc:creator>
      <dc:date>2023-08-22T08:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321097#M10225</link>
      <description>&lt;P&gt;I changed the target in the daml-file and can run the souluton.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 12:25:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321097#M10225</guid>
      <dc:creator>Daniel4</dc:creator>
      <dc:date>2023-08-22T12:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: mutual exclusion checkboxes</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321334#M10230</link>
      <description>&lt;P&gt;The attached solution (should work with 3.0) has two options: one with a code-behind implementation and one with a XAML based implementation that is using a value converter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2023 19:06:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/mutual-exclusion-checkboxes/m-p/1321334#M10230</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-08-22T19:06:10Z</dc:date>
    </item>
  </channel>
</rss>

