PriorityBinding not supported?!

7 posts, 0 answers
  1. Kristoffer
    Kristoffer avatar
    30 posts
    Member since:
    Oct 2012

    Posted 29 Oct 2012 Link to this post

    I have some properties that need some time to execute (e.g. operation via TCP). Hence, it makes sense to bind these properties asynchronously. I cannot get this working using RadPropertyGrid.

    <Grid>
      <Grid.DataContext>
        <ObjectDataProvider ObjectType="{x:Type viewModels:MyViewModel}" IsAsynchronous="True" x:Name="myViewModel" />
      </Grid.DataContext>
      <telerik:RadPropertyGrid x:Name="settings" Item="{Binding}" AutoGeneratePropertyDefinitions="False">
        <telerik:RadPropertyGrid.PropertyDefinitions>
          <telerik:PropertyDefinition GroupName="TCP" DisplayName="Status">
            <telerik:PropertyDefinition.Binding>
              <PriorityBinding FallbackValue="Reading...">
                <Binding Path="Status" IsAsync="True" Mode="TwoWay" />
              </PriorityBinding>
            </telerik:PropertyDefinition.Binding>
          </telerik:PropertyDefinition>
        </telerik:RadPropertyGrid.PropertyDefinitions>
      </telerik:RadPropertyGrid>
    </Grid>


    The code looks right to me but it yields a System.Windows.Markup.XamlParseException:

    Additional information: A 'PriorityBinding' cannot be set on the 'Binding' property of type 'PropertyDefinition'. A 'PriorityBinding' can only be set on a DependencyProperty of a DependencyObject.

    Either I'm doing it wrong, or your property grid doesn't support this...?

    Please help!
  2. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 29 Oct 2012 Link to this post

    Hi,

    Currently this is not supported. We will need some time to research the options for a possible implementation. Would it be possible for you to send us a sample project that illustrates your scenario, so that we would be able to test it with it?

    All the best,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Kristoffer
    Kristoffer avatar
    30 posts
    Member since:
    Oct 2012

    Posted 29 Oct 2012 Link to this post

    I'll create a sample project. Meanwhile, why doesn't the property grid acknowledge the IsAsync property? I think this is the most crucial error here. If I bind my slow property to a TextBlock with IsAsync set to true, it does indeed bind it asynchronously.

    So, to test this you only need compare the binding mechanism to this:
    <TextBlock>
    <TextBlock.Text>
    <Binding Path="SlowProperty" IsAsync="True" FallbackValue="Off" />
    </TextBlock.Text>
    </TextBlock>

    When I debug the two (TextBlock vs PropertyGrid) I can see that the latter takes place in Main Thread whereas the first correctly takes place in a worker thread. Please fix this!
  5. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 29 Oct 2012 Link to this post

    Hello,

    Basically, we have an internal logic that copies PropertyDefinition's bindings and sets them to the respective editor controls. Unfortunately, both of the mentioned options are not currently supported. We will do our best to include the implementation for our next week's internal build. I will drop a line here to notify you as soon as it is publicly available.

    Regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  6. Kristoffer
    Kristoffer avatar
    30 posts
    Member since:
    Oct 2012

    Posted 03 Dec 2012 Link to this post

    Just tried your latest version. Still not fixed. Any hope for an update before 2013?
  7. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 03 Dec 2012 Link to this post

    Hi,

    Unfortunately we did not manage to push this with the Service pack. We will do our best make it available with the next week's build. Please excuse us for this inconvenience.

    All the best,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  8. Ivan Ivanov
    Admin
    Ivan Ivanov avatar
    1127 posts

    Posted 10 Dec 2012 Link to this post

    Hi,

    Unfortunately the changeset did not make it to the IB as it has yet to pass the testing process. I will prepare a custom build for you to test it on your side. Please, excuse us for this inconvenience.

    Kind regards,
    Ivan Ivanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top
UI for WPF is Visual Studio 2017 Ready