Closed tonyfonager closed 3 years ago
@tonyfonager let me try to reproduce the problem and find a solution. I'll do it: right now
Edit: Can you send me a more detailed code?
Great, I have looked thru your source to see if I could find something that did it, but without luck.
So it could be something in my code, maybe ... I dont know!
But I have temporarily fix it by overriding your class and setting it implicit like this :
public partial class NavigationPageQuizmo : NavigationPageSam
{
public NavigationPageQuizmo(Page root) : base(root)
{
this.BarBackgroundColor = Color.FromHex("#6d4585");
this.BarTextColor = Color.White;
}
}
It fixes it for now, and I can start testing your nice package ;-)
Can you send me a more detailed code?
Its part of a huge / complex game project, so it would be too much of a hassle to separate it out, sorry!
But feel free to ask me anything, and I will provide it - as I wrote initially, the background color of my navigation area was set thru a style inside app.xaml page, but when I added your control that area became white (default) again.
https://github.com/scriptBoris/NavigationSam/tree/issue1%23navigationBackcolor This branch for solve you problem (in process)
Sweet, I also wondered why that constructor with no parameter was missing 👍
You gonna push a new package later ?
And thanks for the quick reply @scriptBoris
I can publish new version on right now, if i solve problem
@tonyfonager solution: try to specify the type explicitly
code:
<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:navSam="clr-namespace:NavigationSam;assembly=NavigationSam"
x:Class="Sample.App">
<Application.Resources>
<Color x:Key="NavigationBarColor">#6d4585</Color>
<Color x:Key="NavigationBarTextColor">#FFF</Color>
<Style TargetType="{Type navSam:NavigationPageSam}">
<Setter Property="BarBackgroundColor" Value="{StaticResource NavigationBarColor}" />
<Setter Property="BarTextColor" Value="{StaticResource NavigationBarTextColor}" />
</Style>
</Application.Resources>
</Application>
When I try adding that, I do not get any classes from intellisense when typing "navSam:"
I tried adding it manually, could compile but navigation area is still white.
Please note, I have not updated Nuget or anything!
@tonyfonager the problem is most likely due to the fact that NavigationPageSam does not have a open constructor. I will fix this in the new version of the package 1.0.2
BUT, you can now solve this problem. Just write {Type navSam:NavigationPageSam} and rebuild project
It worked
I tried adding it anyway, with no luck.
But let me was and test the new Nuget 1.0.2
I tried adding it anyway, with no luck.
But let me was and test the new Nuget 1.0.2
Nuget 1.0.2 is published
Thanks alot, I have upgraded to 1.0.2 and can confirm it works now 🥇
@tonyfonager cool!
P.S. Can you star me github project?
Starred 👍
I have now implemented your fine Nuget package for my Xamarin.Forms app.
Normaly my NavigationPage background color is set via a style definition :
But when I change to using your NavigationPageSam(), it becomes white ?
Any idea how I can change the color in my app now ?