How to change the color of progress indicator in windows phone 7 - xaml

I want to change the color of the progress indicator. The default color is Red. If i want to change the color to Blue mean what i have to do. I can not find any property for the indicator color. Is it possible to change the color?
<Grid Background="#7F000000" x:Name="ProgressGrid" Visibility="{Binding Path=IsVisible}">
<TextBlock HorizontalAlignment="Center" Margin="10,500,0,0" Height="100" Text="{Binding Path=AppResources.Label558, Source={StaticResource LocalizedStrings}}" FontSize="28" FontWeight="Bold" />
<ProgressBar IsIndeterminate="True" Width="383" Margin="0,500,0,0" />
</Grid>
Please let me know any idea..

Yes, it is possible. Change Foreground property of progress bar to achieve that :
<ProgressBar Foreground="Blue" />
Another thing that you missed is, progress bar color is set to phone accent theme by default. You see it Red because phone theme is set to red accent at that moment. And it isn't recommended to change the default behavior, unless you have a good reason to do so.

Related

How to resize NavigationView and SplitView in UWP

I want to enable user to resize the NavigationView in my UWP app. Couldn't find any resources how I could do that.
I see some of the apps have "Resizable splitView" but for SplitView also, I cannot see any such resize property exposed to set by default.
Pls help.
Thanks in Advance
There are no such property can resize SplitView and NavigationView, you need to custom layout to implement a similar effect. You could use Slider control and bind the OpenPaneLength Property of SplitView to Slider.Value to do this. Please refer to the following code.
<Grid>
<SplitView Name="CoreSplitView"
DisplayMode="Inline"
IsPaneOpen="True"
OpenPaneLength="{Binding Value, ElementName=MasterSlider, Mode=OneWay}">
<SplitView.Pane>
<Grid Name="PaneGrid" Background="Gray">
<Slider Name="MasterSlider"
MinWidth="480"
VerticalAlignment="Stretch"
Maximum="480"
Minimum="10"
Opacity="0"
Value="150"
/>
<StackPanel Name="PaneStackPanel"
Margin="0,0,10,0" Background="LightGray">
<TextBlock TextWrapping="Wrap" Text="Use a slider when you want your users to be able to set defined, contiguous values (such as volume or brightness) or a range of discrete values (such as screen resolution settings).A slider is a good choice when you know that users think of the value as a relative quantity" />
</StackPanel>
</Grid>
</SplitView.Pane>
<Grid Name="ContentGrid" Background="LightSteelBlue">
</Grid>
</SplitView>
</Grid>
The StackPanel that is directly under our slider, acts like a cover for our Slider. Notice the StackPanel has Margin="0,0,10,0", this translates to a 10px distance from the right wall, which allows the Slider area to be exposed as a gray strip that is used to drag the Pane, again the 10px is arbitrary but it has to match the Minimum of the Slider.

OxyPlot in Xamarin Forms WPF project, how to change tracker text color

I'm using OxyPlot in a Xamarin Forms project.
In WPF, the tracker (popup when I click on a datapoint) has a white background with yellow text, making it impossible to see.
In UWP however, it is just fine with a yellow background and black text.
How can I change the font color of the tracker to black?
xmlns:oxy="clr-namespace:OxyPlot.Xamarin.Forms;assembly=OxyPlot.Xamarin.Forms"
<oxy:PlotView Model="{Binding MyModel}"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
</oxy:PlotView>
You can change the default colors of Oxyplot Tracker by modifying the Control Template. For example,
<oxy:PlotView Height="500" Width="500" Model="{Binding MyModel}">
<oxy:PlotView.DefaultTrackerTemplate>
<ControlTemplate>
<oxy:TrackerControl Position="{Binding Position}" LineExtents="{Binding PlotModel.PlotArea}">
<oxy:TrackerControl.Background>
<SolidColorBrush Color="LightBlue" />
</oxy:TrackerControl.Background>
<oxy:TrackerControl.Content>
<TextBlock Text="{Binding}" Margin="7" Foreground="Black" />
</oxy:TrackerControl.Content>
</oxy:TrackerControl>
</ControlTemplate>
</oxy:PlotView.DefaultTrackerTemplate>
</oxy:PlotView>
Of course, you can set the binding as well in the above, but for the sake of example, given the color directly in above example.

How to change color of Indeterminate ProgressBar in Windows phone

How can I change color of Indeterminate ProgressBar in Windows phone?
I have tried setting the background and border brush to null and change the foreground to black:
<ProgressBar Minimum="0" Maximum="100" IsIndeterminate="True" Foreground="Black" Background="{x:Null}" BorderBrush="{x:Null}"/>
But when I run it, it still has blue as the animation dots moving across the screen.
You need to change the <Style>
Document Outline > Right Click Progress Bar > Edit Template -> Edit A Copy
Look for
<Rectangle x:Name="E1" Fill="{ThemeResource ProgressBarIndeterminateForegroundThemeBrush}"/>
Change the Fill to any color you like
Repeat for Rectangle E2,E3,E4,E5
Or if you can just override ProgressBarIndeterminateForegroundThemeBrush
In App.xaml, like so
<Application.Resources>
<SolidColorBrush x:Key="ProgressBarIndeterminateForegroundThemeBrush" Color="Yellow" />
</Application.Resources>

Inmobi ads Displayed issue on Windows Phone 8

I want to set the Inmobi ads on the bottom of the screen.
In XAML i set the Horizontal and Vertical alignment in bottom. when i saw the design i saw the AdView in bottom of screen but when i deploy it By default it appear in Middle.
I'm confused am i did mistake anywhere either it always appear on that place.
<StackPanel x:Name="ControlPanel" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="0,0,0,55" Grid.Row="3" Width="480" >
<Ad:IMAdView
x:Name="AdView1"
RefreshInterval="30"
AdSize="15"
AppId="fcc4c048-4686-42bc-a40c-b7fe8da70b40"
Height="110" Width="480"
AnimationType="SLIDE_IN_LEFT" HorizontalAlignment="Right" VerticalAlignment="Bottom"
Margin="0,0,0,30" >
<Ad:IMAdView.IMAdRequest>
<Ad:IMAdRequest
LocationInquiryAllowed="False"/>
</Ad:IMAdView.IMAdRequest>
</Ad:IMAdView>
</StackPanel>
Changing your stackpanel's HorizontalAlignment property from "Center" to "Right" will work for you...

Windows8 ListView LineHeight

I have added a ListView to a Metro Style Blank App. Added to the ListView are 3 Strings. I want to change the LineHeight , but cannot find a property. Below is my xaml code.
<Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
<ListView HorizontalAlignment="Left" Height="277.167" Margin="235.51,161,0,0" VerticalAlignment="Top" Width="100" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="False" d:LayoutRounding="Auto">
<ListView.RenderTransform>
<CompositeTransform SkewX="-0.338" TranslateX="-0.327"/>
</ListView.RenderTransform>
<x:String>test 1</x:String>
<x:String>Test2</x:String>
<x:String>Test3</x:String>
</ListView>
</Grid>
How do I decrease, increase the line height of the strings in the ListView box? I want to decrease the space between the lines.
Thanks
Try editing a ItemContainerTemplate and then play with the properties available like margin and padding.
See my answer here :
WPF ComboBox customization in windows8
let me know in case you need any help.