Replies: 1 comment 1 reply
-
Thanks for the question. Can you provide a piece of code that goes to the point where you're stuck? Your description of the problem is unclear, and having a tangible piece of code is always better. Thanks. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, I would like to say, I did read the Documentation to the "Templated Control" and "Control Library" here in the uno Documentation:
https://platform.uno/docs/articles/guides/how-to-create-control-libraries.html
My Question/Problem is a bit different from what I would be able to extract from this source...
I have for example a NavigationView with the Header Property and a HeaderTemplate Property, so far so good, but in case I would now maybe have multiple NavigationView controls or even would like to centrally define that Template in such ControlLibrary, my Problem on this is, for example for a DataTemplate we would need a Definition of DataType, but there is no NavigationViewHeaderTemplate to reference, just because, its mostly only Content => Object
But since the BackButton of a NavigationView is not bindable to a Command, so if you would like to Bind it to a central ViewModel (Mvux) Navigate Command, that would only be possible with directly nesting it in that NavigationView and only in the Header, not as DataTemplate (tryed AncestorBinding an ItemsControlBinding, just putting the Layout definition in a DataTemplate is resulting in not longer be visible in the build Application!)
So honestly I am now a bit frustrated of that :(
Similar thing for the ListViewHeader and GridViewHeader which parent is in both cases nested in a FeedView for the Refresh Command. I would like to reuse a Layout Definition and tell it to bind to the Refresh Command as I did with just adding the copyed definition in the Header Directly. Directly Inserted: No problem, but it seems not to be possible to even define a ControlTemplate because these both Controls (GridView / ListView) are having different Types of Headers and the ListViewBaseHeader or similar named is not working for this...
Maybe there is a "simple" solution I am just overseeing, so hopefully someone here could help me with that avoiding that constant copy paste for same thing? Everytime I add a command DependencyProperty to a Template that big Problem is disabling me from this plan 😞
Beta Was this translation helpful? Give feedback.
All reactions