C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » Silverlight »

X:name


Posted Date: 29 Sep 2009      Posted By: Ameer      Member Level: Silver     Points: 1   Responses: 2



1)can anyone tell me the difference between x:Name ad X:Uid fo a control.
2) when to use X:Name ad X:Uid, providing the Name attribute for a control?





Responses

Author: Anuraj    29 Sep 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

They are equal. Each component needs a context informationa which can be given in three possible ways : x:Uid, x:Name and Name.

Taken from net:

Visual Windows Presentation Foundation (WPF) Localization

When Sisulizer scans XAML data (either .xaml file or BAML resource inside assembly file) it needs a context information for each component. To get this context information Sisulizer looks for special name/context attributes that contain the name of the control. There are three possible attributes: x:Uid, x:Name and Name. If your XAML data does not contain name attributes Sisulizer will write the following hint to the log file:

Thanks
Anuraj
THIS POSTING IS PROVIDED "AS IS" WITH NO WARRANTIES, AND CONFERS NO RIGHTS.
BEWARE OF BUGS IN THE ABOVE CODE; I HAVE ONLY PROVED IT CORRECT, NOT TRIED IT.
dotnetthoghts



Author: Arjune    29 Sep 2009Member Level: GoldRating: 4 out of 54 out of 54 out of 54 out of 5     Points: 6

To Add some point

X:UID value cannot be accessed in the code behind whereas name values can be accessed in code behind

Kindly rate the answer if it is helpful



Post Reply
You must Sign In to post a response.
Next : How to pass an datatable from aspx to xaml
Previous : Use of silverlight in .net
Return to Discussion Forum
Post New Message
Category: Silverlight

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use