winrt-xaml

Moving Image in ScrollViewer (UWP)

别来无恙 提交于 2019-12-30 05:08:06
问题 I've got a Image in Scrollviewer ... <ScrollViewer x:Name="Scrollster" ZoomMode="Enabled" MinZoomFactor="1" MaxZoomFactor="4" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" ManipulationMode="All"> <Image x:Name="Img" Source="{x:Bind ImgSource}" Stretch="UniformToFill" PointerPressed="Img_PointerPressed"/> </ScrollViewer> I want to move Image when I drag image with Mouse Pointer! I tried: private void Img_PointerPressed(object sender,PointerRoutedEventArgs e) { var p =

Save canvas with background image on WinRT

女生的网名这么多〃 提交于 2019-12-30 04:59:28
问题 I want to make a simple drawing app for children with C# for WinRT. The user can choose a picture and draw a little bit. But how can I save the image (together with the background)? There is no functionality to save the image with background. 回答1: I tried to use your library to render a Canvas into an image file but I got this error runtime: "Can't find component. (Exception from HRESULT: 0x88982F50)". Code looks like this: //SAVE private async void saveButton_Click(object sender,

How to animate a Popup when it hides?

三世轮回 提交于 2019-12-30 04:59:05
问题 i created a Popup Style for using in my windows 8.1 application. And i applied PopupThemeTransition to it's ChildTransitions Property. <Style x:Key="AnimatedPopupStyle" TargetType="Popup"> <Setter Property="IsLightDismissEnabled" Value="False"/> <Setter Property="ChildTransitions"> <Setter.Value> <TransitionCollection> <PopupThemeTransition/> </TransitionCollection> </Setter.Value> </Setter> </Style> My problem is that it animates when it Opens & not animating when closing. What to do with

How to Clip content with rounded corners in Windows Store App

百般思念 提交于 2019-12-29 05:22:14
问题 I've attempted to have a <Grid/> (with interactive stuff inside, not just an image) clipped with rounded corners (a <Border/> or a <Rectangle/> , whatever works). I've attempted multiple solutions, but none of them was compatible with a Windows Store App. No brush: RadialGradientBrush is not supported in a Windows App project. DrawingBrush is not supported in a Windows App project. The type 'VisualBrush' was not found. Verify that you are not missing an assembly reference and that all

Listview selection display with no padding and no checkmark

假如想象 提交于 2019-12-28 13:38:44
问题 I have this XAML to display a ListView in a C++/CX code. The ListView will be used as a selection menu. <ListView x:Name="itemsListView" ItemsSource="{Binding Source={StaticResource MenuDataSourceCVS}}" HorizontalAlignment="Stretch" Width="230" Margin="0,45,0,0" VerticalAlignment="Top" Grid.Row="1" SelectionChanged="itemsListView_SelectionChanged" SelectionMode="Single" HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" FontFamily="Global User Interface"> <ListView

Change cursor in Windows Store Apps

感情迁移 提交于 2019-12-28 06:28:26
问题 I'm making a Windows Store app in C# and I have a normal TextBlock with a link inside it. And all I want to do it to make the cursor change into a hand when it goes over the text block, but unlike in WPF applications, there is no Cursor propriety. I know is a CoreCursor class in Windows.UI.Core . Am I suppose to use it somehow? 回答1: Window.Current.CoreWindow.PointerCursor = new Windows.UI.Core.CoreCursor(Windows.UI.Core.CoreCursorType.Hand, 1); 回答2: WinRT XAML Toolkit has an attached property

How do I access a control inside a XAML DataTemplate?

假装没事ソ 提交于 2019-12-27 10:26:08
问题 I have this flipview: <FlipView x:Name="models_list" SelectionChanged="selectionChanged"> <FlipView.ItemTemplate> <DataTemplate> <Grid x:Name="cv"> <Image x:Name="img1" Source = "{Binding ModelImage}" Stretch="Fill" Tag="{Binding ModelTag}"/> </Grid> </DataTemplate> </FlipView.ItemTemplate> I want to find img1 of currently selected index. While searching for it I found this method on some post here: private DependencyObject FindChildControl<T>(DependencyObject control, string ctrlName) { int

ScrollViewer reaching bottom WindowsPhone8

£可爱£侵袭症+ 提交于 2019-12-25 16:09:38
问题 Im trying to open a App-Bar when the user reaches the end of the (ScrollViewer)Page... Therefore I need a indicator when the end is reached... My Scrollviewer (maybe because WP8) has no "ViewChanged"-event like posted in other questions And this solution is just overkill for my Problem I think: http://blogs.msdn.com/b/slmperf/archive/2011/06/30/windows-phone-mango-change-listbox-how-to-detect-compression-end-of-scroll-states.aspx I cant find any event within this Viewer which could help me...

Windows 8 XAML possible bug - using images causes text controls to disappear

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 12:42:38
问题 I have a strange problem happening intermittently with my apps where textbox controls would disappear intermittently. I have narrowed the cause of this down to having image files (small logos etc) on my page. I have managed to create a simple project which contains an xaml page with an image and 2 textblocks (these are in grids). I have found on two test tablets that I can re-create the problem by going to task manager and creating a dump file for the running app. After I do this twice and

Windows 8 XAML possible bug - using images causes text controls to disappear

◇◆丶佛笑我妖孽 提交于 2019-12-25 12:42:10
问题 I have a strange problem happening intermittently with my apps where textbox controls would disappear intermittently. I have narrowed the cause of this down to having image files (small logos etc) on my page. I have managed to create a simple project which contains an xaml page with an image and 2 textblocks (these are in grids). I have found on two test tablets that I can re-create the problem by going to task manager and creating a dump file for the running app. After I do this twice and