Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

After renaming xaml file, getting error "this name does not exist in the current context"

$
0
0

After renaming xaml file, if a put x:Name for any control and use it in .cs file I am getting "this name does not exist in the current context".

Any idea why this error ??

I put x:Name (x:Name="label1") for a label, for this I can put textColor, but when I put Font="Bold, Medium", it is not taking. means text is not becoming bold. If the same, I tried in .cs file, I am getting label1 does not exist in the current context. I put the label1.Font after InitializeComponent () in the constructor.

public MyPage ()
{
    InitializeComponent ();
    this.Title = "MyPage<del></del>";
    label1.Font = Font.SystemFontOfSize (15).WithAttributes (FontAttributes.Bold);
}

Thanks
Nithin


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>