Accessing an object of a tabitem in Silverlight -


I have a Silverlight user contract where I have a tabotron that uses some tabs. Now each tabtime is another user contract I was wondering if there is any way to use one of these user control tabits. For example, if I have xaml in my main user:

  & lt; Control: TabControl x: name = "TabControl" grid. Roll = "1" grid. Column = "1" foreground = "# 234 BC3" & gt; & Lt; Control: TabItem header = "Prestige" x: name = "tabperous" visibility = "abridged" & gt; & Lt; NSL: PrestatiesUC & gt; & Lt; / NSL: PrestatiesUC & gt; & Lt; / Control: TabItem & gt; & Lt; Control: TabItem header = "Protocol" x: name = "tabprote" visibility = "abridged" & gt; & Lt; NSL: ProtocollenUC & gt; & Lt; / NSL: ProtocollenUC & gt; & Lt; / Control: TabItem & gt; & Lt; Control: TabItem header = "ADT" x: name = "tab edit" visibility = "abbreviated" & gt; & Lt; NSL: AdtUC & gt; & Lt; / NSL: AdtUC & gt; & Lt; / Control: TabItem & gt; & Lt; / Control: TabControl & gt;  

And I have an object in my Prestige UC user:

  & lt; Button x: name = "btnReSend" content = "resend" width = "75" height = "25" margin = "10" click = "resubuton" />  

How can I go about dynamically disabling its visibility on startup in the main user control code?

I tried such things:

  Prestige BAMUC TMP = New Prestige BAMUC (); Tmp.btnReSend.Visibility = Visibility. Collapsed;  

But that does not work.

Any thoughts?

The main user control should do this in the loaded event: -

  (PrestatiesUC) TabPres.Content) .btnReSend.Visibility = Visibility.Collapsed; Although it is a bad stink, generally it is not a good idea to do something like a home page, how deep is the user's tranquilization structured internally. Are there.  

Is not it better that "Prestige" event?

If not, then create some interfaces that have been implemented by Prestige (and possibly other User Controllers included). Calculates on a set of bus tabs while loading in the main page and a method calls on this interface passing through some state object. After this, user administrators make choices about that condition of that control.

If it seems to be at the top, then at least hide the button by adding an asset to the user control: -

  // Public Bull in the Prestige UC Reservable {Back {btnReSend.Visibility == Visibility. Get visibility}} set {btnReSend.Visibility = value? Visibility View: visibility. Collapsed; }}  

Your code will now appear in the main user control: -

  (PrestatiesUC) TabPres.Content) .ReSendVisible = False;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -