Code behind cannot access XAML control

2 posts, 0 answers
  1. Hugh
    Hugh avatar
    1 posts
    Member since:
    May 2014

    Posted 16 Feb 2015 Link to this post

    I have added a busyindicator to my detailspage.xaml:
        
         xmlns:telerikPrimitives="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Primitives"
          x:Class="DataBoundApp4.DetailsPage"

          <telerikPrimitives:RadBusyIndicator x:Name="myIndicator" IsRunning="True" Grid.Row="0" Content="Loading..." Grid.Column="0" Grid.ColumnSpan="2" AnimationStyle="AnimationStyle5" Foreground="White"></telerikPrimitives:RadBusyIndicator>

    This works, and shows the indicator. I am now looking to control the indicator from my .cs file.
    But intellisense does not pickup the "myIndicator" control I've declared in the XAML!

    I have this namespace declared in my detailspage.xaml.cs
         using Telerik.Windows.Controls;

    What am I missing from my file in order to access the control. Looking at all the samples/demos I seem to have the right pieces in the right place :(


  2. Ivaylo Gergov
    Admin
    Ivaylo Gergov avatar
    661 posts

    Posted 19 Feb 2015 Link to this post

    Hello Hugh,

    The problem should be related to VS. Could you please try to clean and rebuild the project. Also, try to restart the visual studio designer.

    Please, let me know if this helps.

    Regards,
    Ivaylo Gergov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
Back to Top