ModernProgressRing IsActive Databinding

Dec 30, 2014 at 7:18 PM

I am trying to databind IsActive property of the control to a dependecy property but it is not working.
<UserControl x:Class="MegoloadModern.Pages.Home"
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid Style="{StaticResource ContentRoot}">

        <mui:ModernProgressRing IsActive="{Binding IsLoading}" Width="80" Height="80" Panel.ZIndex="10" Style="{StaticResource WaveProgressRingStyle}" />

        <h:HelixViewport3D x:Name="mainViewport"  Grid.Column="0" Grid.RowSpan="1"  RotationSensitivity="0.3" InfiniteSpin="True" 
                           ZoomExtentsWhenLoaded="True" ZoomAroundMouseDownPoint="True">
                <ModelVisual3D Content="{Binding Model}"></ModelVisual3D>

And my dependecy property is like this
        public bool IsLoading
            get { return (bool)GetValue(IsLoadingProperty); }
            set { SetValue(IsLoadingProperty, value); }

        public static readonly DependencyProperty IsLoadingProperty =
            DependencyProperty.Register("IsLoading", typeof(bool), typeof(HomeViewModel), new PropertyMetadata(false));

        public HomeViewModel()
            IsLoading = true;
            IsLoading = false;
Jan 1, 2015 at 6:59 PM
My mistake i wasn't executing code in a seperate thread therefore blocking ui thread causing the bindings to fail.
Marked as answer by mertkokusen on 1/1/2015 at 11:59 AM
Jun 9, 2015 at 1:16 PM
Hi mertkokusen,

I meet the same issue with you listed above, how do you solve this issue on your side? As your last comments said, we need to execute code in a seperate thread, I have tried to call it in a seperate thread, but it still doesn't work for me. Could you share your way or your source code to me here? Million thanks for your help.