w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
  Home » XAML » Page 1
Binding autocompletebox with a listbox in windows phone 8
Better have a list to bind Autocompletebox like that:http://mobileosgeek.com/databinding-an-auto-complete-box-in-windows-phone/ .

Categories : Xaml

Pivot control covering up stackpanel / image control
The Pivot margin is bounded to the status of the StatusBar. Plus the Pivot is prose to be a top level control meaning nothing else on the page. ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow); Will get your desire results. See Pivot Grid Problems where the guy has the same problem but with Grid Row definitions.

Categories : Xaml

Windows Phone 8.1 - Pivot Header
If you just want to change the background color of all the headers, this is how you can do it in Window Phone 8.1. First, use Expression Blend to generate the default style of the Pivot control. <Thickness x:Key="PivotPortraitThemePadding">19,38,0,0</Thickness> <Thickness x:Key="PivotLandscapeThemePadding">19,25,0,0</Thickness> <Style x:Key="CustomPivotStyle" TargetTyp

Categories : Xaml

Strange behaviour of combobox in WinRT
Just corrected this issue using a VirtualizingStackPanel in place of a StackPanel. We had to set a size cause otherthise it take all the width of the screen. <VirtualizingStackPanel HorizontalAlignment="Center" Width="150"/> We didn't try to get a more flexible solution because we don't need it yet Hope it will help you

Categories : Xaml

disable autocomplete in xamarin.forms pcl xaml page
Forms supports a KeyboardFlags.Suggestion enum which I assume is intended to control this behavior, but it doesn't appear to be very well documented.

Categories : Xaml

How to deactivate GridViewItem-click animation?
In order to do it only for right clicking, you'll likely have to make a custom control that doesn't trigger pointer pressed state change on right click, but does on left click. The next part is for left- and right-clicks: There are two things to try, based on your current Xaml. In the GridViewItem default styles and templates there are two content templates, one which uses GridViewItemPresenter

Categories : Xaml

Adding button to right side of Hub header
The solution is very simple. Instead of placing the button inside <Hub.HeaderTemplate> tag, place it in the Grid that contains the Hub itself. for example, <Grid> <Hub> .... </Hub> <Button> .... </Button> </Grid>

Categories : Xaml

How to fire up 'clicked' event after 'command' event of a button click in XAML?
Not that I know of. But what you could do, if you want the command to trigger something that is handled in the code behind, is to remove the 'clicked' event handler and in your command handler publish an event that is subscribed to my your code behind. Just an option.

Categories : Xaml

Bindings on a ContentControl do not update the data
You should implement INotifyPropertyChanged interface in order to track property changes. I'm sure everything works fine then. This works for me: public partial class MainWindow : Window, INotifyPropertyChanged { private object value; public MainWindow() { InitializeComponent(); Loaded += MainWindow_Loaded; DataContext = this; } public objec

Categories : Xaml

ItemsControl Wrapping
Sorry.I don't know very well English so I couldn't understand exactly what you mean.But If you want a sequence as above and If you want to remain static position of items.You can use UniformGrid . I hope this is what you're looking for. Here is code: I did a listview sample; <ListView x:Name="SharedSizeScopeListView"> <ListView.ItemsPanel> <ItemsPanelTemplat

Categories : Xaml

How to set map's language
You have to use the Culture parameter, not the Language parameter. This is documented here: http://msdn.microsoft.com/en-us/library/dn306047.aspx Try the following: <Maps:Map Credentials="key" Culture="ru" Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ZoomLevel = "7.5">

Categories : Xaml

Windows 8.1 xaml stretch doesnt shrink button
The button has certain margins and paddings, this is why it can only shrink to a certain size. Your cell size is smaller than that, you can workaround this by editing the ControlTemplate of the button.

Categories : Xaml

MergedDictionaries can not be referenced from App.xaml
Please try this code. <Style TargetType="TextBlock"> <Setter Property="Foreground" Value="#FF64CCEF"/> <Setter Property="SnapsToDevicePixels" Value="True"/> <Setter Property="FontFamily" Value="{DynamicResource FontFamilyResource}"/> </Style> <FontFamily x:Key="FontFamilyResource">/ApplicationName(SolutionName);c

Categories : Xaml

How to make CheckBox bigger on Windows 8
Several ways: You can increase the overall size by applying a render transform. This will double the height and width during rendering. It may not lay out as you want. <CheckBox RenderTransformOrigin="0.5,0.5" > <CheckBox.RenderTransform> <CompositeTransform ScaleX="2" ScaleY="2"/> </CheckBox.RenderTransform> </CheckBox> You can use a ViewBox, whi

Categories : Xaml

Adding A Background Image In XAML
Please try this code.It works <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> <Button Content="Home" HorizontalAlignment="Left" VerticalAlignment="Top" Height="36" Width="91" BorderBrush="Orange" Foreground="Orange" FontFamily="BankGothic Md Bt"/> <Image Stretch="None" VerticalAlignment="Center" HorizontalAlignment="Center" Source="Images/super.jpg"

Categories : Xaml

How can I add a botton on the right side of the Pivot Header
I tried editing the template for that control, but it looks like it doesn't have one. The best option then is to insert the button like you did. Only difference is, I overlay the button over the header using their top container grid. Like so: <ScrollViewer x:Name="ScrollViewer" HorizontalSnapPointsAlignment="Center" HorizontalSnapPointsType="MandatorySingle" HorizontalScrollBarVisibility="H

Categories : Xaml

Animating Hub's scrolling
You can do it like this. async private static Task ScrollHubToSection(Hub hub, HubSection section, int index) { var dispatcher = hub.Dispatcher; var viewer = hub.GetDescendantsOfType<ScrollViewer>().First(); double offset = 0; for (int i = 0; i < index; i++) { offset += hub.Sections[i].ActualWidth; } await dispatcher.RunA

Categories : Xaml

Translate css animation to wpf animation
Which animation What you want in this site (http://tympanus.net/Development/ModalWindowEffects/) Sorry I dont know very well English.I couldn't understand exactly what you say I did this animation for you.I hope benefits to your business. Here is code: <Storyboard x:Key="ScaleAnimation"> <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(Tran

Categories : Xaml

Multiple resolutions on Windows Phone 8.1
Please refer section "1.a.i" as guideline (http://msdn.microsoft.com/library/windows/apps/xaml/hh965325.aspx) mention by you. You need to create image with 96 DPI, considering as 100% scale. I also recommended refer guidelines provided in this link http://msdn.microsoft.com/en-US/library/windows/apps/xaml/hh465362.aspx. Refer below statement from provided link. "Windows Runtime apps (that ru

Categories : Xaml

Windows Phone 8.1 Toggling the visibility of a TextBlock in a DataTemplate
The problem I'm having is that I can't access the TextBlock from the C# code. Yes, since the TextBlock is defined inside a DataTemplate, the TextBlock won't be available until the DataTemplate has been applied. Thus, the x:Name attribute won't automatically generate a variable reference in the InitializeComponent method in your *.g.i.cs file. (Read up on XAML Namescopes for more information).

Categories : Xaml

Overriding Appbarbutton brushes wp8.1 (Winrt) not working
You cannot override the colours on individual AppBarButtons in the AppBar on Windows Phone. You can set the foreground and background colours of the AppBar itself and that will reflect in the AppBarButtons.

Categories : Xaml

Windows Phone 8.1 xaml - read language resources from external project
I use this code with Windows Phone Universal Apps, but with a general resources: <TextBlock Style="{StaticResource TextBlock_BlackStyle}" x:Uid="/Resources/txtIPName" Name="txtIPName" HorizontalAlignment="Left" Margin="33,149,0,0" TextWrapping="Wrap" Text="IP:" VerticalAlignment="Top"/> Then if u had exertanl library, I think the code is: <TextBlock x:Uid="/Assembly/AppLocalizations/K

Categories : Xaml

Windows phone 8.1 wizard control
There is no specific template to accomplish this task. The most common way to do it would be to create a separate page for the wizard. On the page you'll use various controls to actually create a settings page. Most likely these will include Textblock (for static text), TextBox (for text entry), and ToggleSwitch for binary (e.g. On/Off) options. Here's an example of what you could use to create

Categories : Xaml

How to draw this border in XAML
You will have to create a path <Path Data="M0,0 L20,0 L19.4838,0.006531 C8.84821,0.275986 0.275986,8.84821 0.006531,19.4838 L0,20 z" Fill="Red" Height="10" Stretch="Fill" Width="10"/> You can achieve this using Blend. Draw a rectangle and an ellipse like this Select both the ellipse and the rectangle together (but make sure you select ellipse first and rectangle second). Then right cl

Categories : Xaml

ElementName Binding In ToolTip
<Grid> <Grid.Resources> <BindableObjectReference x:Key="BindableGridView" Object="{Binding ElementName=SearchResultsPresenter}"/> </Grid.Resources> <RadGridView x:Name="SearchResultsPresenter" ItemsSource="{Binding SearchResults}"> <ToolTipService.ToolTip> <ToolTip> <TextBlock>

Categories : Xaml

XAML control that supports data binding except listview or listbox
If it's a better collection viewer you are looking for for, use a DataGrid. If you want to show more info, it's worth making another panel and showing more data there about the selected item (master detail pattern) All XAML controls support data bindings. Use DataContext if you want children to access the binding, otherwise you can bind directly on the property. For example, you could have a se

Categories : Xaml

How to Style PivotItem Header
Change the <ContentPresenter> to a <TextBlock> Like so <Style x:Key="PivotHeaderItemStyle1" TargetType="Primitives:PivotHeaderItem"> <Setter Property="Background" Value="Transparent"/> <Setter Property="Padding" Value="10,0,10,0"/> <Setter Property="Margin" Value="0"/> <Setter Property="Template"> <Setter.Value>

Categories : Xaml

xaml - Create Resources with UI
You can create design-time data to bind to so the list can fill with data in the designer. See Displaying data in the designer for how to set this up.

Categories : Xaml

DataTrigger from interaction not working Windows Phone
It seems that RelativeSource.TemplatedParent works fine inside a template, but the triggers don't work as expected: if the trigger condition matches initially, the trigger/action doesn't fire. If you change the bound property programmatically, the trigger will fire. That's why it works with IsPressed: the button didn't start out pressed; it was pressed after it was loaded. If you move the trigg

Categories : Xaml

Visibility converter based on another element width
To bind to a property of another element, you would do something like this: Visibility="{Binding ActualWidth, ElementName=TheThingWhoseWidthYouAreBindingTo, Converter={StaticResource WidthToVisibilityConverter}}" And then create yourself a WidthToVisibilityConverter that takes the width value and returns a Visibility value.

Categories : Xaml

Windows Phone 8.1 (XAML). Strange text cutting bug inside ListView (with some conditions)
This is expected behavior. Consider, instead, the following XAML: <Page.BottomAppBar> <CommandBar> <AppBarToggleButton Icon="Favorite" Checked="AppBarToggleButton_Checked" Unchecked="AppBarToggleButton_Unchecked" /> </CommandBar> </Page.BottomAppBar> <Grid> <Pivot Title="Title0"> <PivotItem Header="Header0">

Categories : Xaml

Horizontally stretch items with horizontal orientation
I would work with a Grid and set the column width to zero in order to hide it. Since all other columns have star values they should stretch accordingly. If everything fails you can recalculate the star values manually since you know the number of visible buttons. Sample: <Grid> <Grid.RowDefinitions> <RowDefinition Height="50" /> </Grid.RowDefinitions>

Categories : Xaml

How can I use the same style on several TextBlock controls, but have each control using different bindings and triggers?
Please try this code.It works.I guess as you wish <Window.Resources> <Style TargetType="TextBlock"> <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding ElementName=CheckBox01,Path=IsChecked}" Value="True"/> <Condi

Categories : Xaml

Hyperlink navigateuri to Childwindow
Why do you want to use the NavigateUri? You can just use the Click event, like you would do with an ordinary Button. <HyperlinkButton x:Name="Login" Content="login" Click="OpenChildWindow" Style="{StaticResource LinkStyle}"/> and in codebehind: public class MyView : UserControl { public MyView() { InitializeComponent(); } public void OpenChildWin

Categories : Xaml

WP 8.1 XAML: Value Does Not Fall Within The Expected Range
Dunno if this will help you or if you've already tried, but you can delete the Visual Studio shadow cache. I use this trick whenever I've tried everything else with no success. The shadow cache is located here: %LOCALAPPDATA%MicrosoftVisualStudio12.0[this number will change depending on your Visual Studio version]DesignerShadowCache Close Visual Studio, delete everything from this folder then r

Categories : Xaml

XAML - GrieView how to style a group
The groups in a GridView aren't actual controls, but rather a collection of item containers and header controls laid out in the ItemsPanel as you can see below. The easiest solution would be to put a line on the left side of each item through updates to ItemContainerStyle.

Categories : Xaml

Animation border - Windows Store App
you should use (Border.Background).(SolidColorBrush.Color) Edit: <Style x:Key="ItemStyle" TargetType="ListBoxItem"> <Setter Property="Height" Value="60" /> <Setter Property="Width" Value="60" /> <Setter Property="Foreground" Value="White" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="ListBoxI

Categories : Xaml

Does a resource dictionary have to be explicitly referenced?
You must reference the ResourceDictionary either in MainPage.xaml or App.xaml, using something like: <Application.Resources> <ResourceDictionary> <!--other resources can be here--> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="rd1.xaml" /> <ResourceDictionary Source="rd2.xaml" /> </Res

Categories : Xaml

How to Create a User Control with Image and Text
So if you want to mimic the picture you could do something like this; <Grid x:Name="LayoutRoot" Background="White"> <Grid.RowDefinitions> <RowDefinition Height="*"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Image Grid.RowSpan="2" Source="{Binding Bitmap}" Stretch="UniformToFill"/> <Border Grid.Row="1"

Categories : Xaml




© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.