-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TransitioningContentControl Help! #754
Comments
@cod3n00b which version? and show us a little code. thx |
@cod3n00b If traCreate.Content IsNot grdTransInfo Then
traCreate.Content = null
Call LoadTra....
traCreate.Content = grdTransInfo
Else
traCreate.Content = null
Call LoadTra....
traCreate.Content = grdTransPay |
First, I've created a module named Transaction. So it goes like this.
That's the code of my first grid(It's not the whole code actually). That's also my way in creating the second grid. |
I've tried your second suggestion. And I've found out that the TransitioningContentControl's ContentTemplateSelector property don't work. I have made a class that inherits the DataTemplateSelector and override the SelectTemplate function. I even try to make a break point in the opening line of the function itself but it doesn't go inside the function. I tried to switch from TransitioningContentControl to WPF's ContentControl (because the TransitioningContentControl inherits the ContentControl right?) and the ContentTemplateSelector property works in WPF's ContentControl. I'm now using the latest alpha release of MahApps.Metro. |
@cod3n00b I can take a quick look at the TransitioningContentControl and see why the ContentTemplateSelector isn't working. Oh, off-topic and not trying to nitpick but... You don't have to use "Call" to call a method/function. You can simply write:
|
Oh, about that. I was aware of omitting the "Call" to call the method/function. But I'm used to it because I thought it's the best practice in calling a method. (I'm only using it in methods, not functions) Anyway, I hope it can be fixed soon if it isn't working. |
I am not sure how easy it would be to implement ContentTemplateSelector because I can't think of a scenario of where it would be useful. I'll need a scenario to test against. |
What I did to test the ContentTemplateSelector before is when I clicked the Next button, it will change the Content property of the TransitioningContentControl to 0 or 1 (just to test what I've learned from self studying it). If the Content property is 0. It will use the first data template (with lots of textboxes, combo boxes, etc.) that I've created. If the Content property is 1 then, it will use the second template (which is actually just a button) to show if it will have its transition without giving me those annoying warnings in my immediate window. Can I try that one you've referenced? Or is it included in the latest alpha release already? |
By the way, I forgot to mention that the TransitioningContentControl doesn't have a smooth transition when those annoying Resource Dictionary Warning 9 errors occurred while in transition. It does only occur when the content to be changed have some controls in it (e.g. some text boxes, combo boxes, labels, etc.). If the content to be changed have only few to none controls or doesn't generate the Resource Dictionary Warning 9 error it works smoothly. That's what I have noticed. I thought before at first that it is because I'm not using ContentTemplate or ContentTemplateSelectors until I observe it once again. |
We will try to get this fixed before the next release. |
I found an issue that is similar to this: #206 |
I need help on using this control. I have 2 Grid control with children controls that are being created dynamically. Now, when I changed the content property of the TransitioningContentControl to one of the grids. It works pretty fine. But when changing it again to another Grid Control. It works fine but with annoying errors that pops in my Immediate window.
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='VerticalScrollBar'
System.Windows.ResourceDictionary Warning: 9 : Resource not found; ResourceKey='TransparentWhiteBrush'
I hope someone could help me here. Thanks in advance.
The text was updated successfully, but these errors were encountered: