Questions tagged [xaml]

23230 questions
1

votes
5

answer
763

Views

SVG images shown blacked out in UWP application

me and my team are trying to put some .svg icons in our UWP win10 application (target and min version are Windows 10 Fall Creators update). In my resource file I defined my SvgImageSource as following: And I then proceed to use this image source in my component: I tried few different svgs and they a...
ivke
0

votes
0

answer
6

Views

Microsoft WPF tutorial - Create the UI for ExpenseReportPage doesn't do what it's supposed to

I am learning WPF from (https://docs.microsoft.com/en-us/dotnet/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application), but when i come to section (https://docs.microsoft.com/en-us/dotnet/framework/wpf/getting-started/walkthrough-my-first-wpf-desktop-application#create-the-ui-fo...
Janko
1

votes
0

answer
9

Views

Xamarin.Forms ScrollView adds extra space

My ScrollView adds extra spaces above the first child and under the last on my iPhone X. There is no padding or margin. I gave the ScrollView a blue background to see it's dimensions better. If I remove the ScrollView, the spacing also is gone. Here`s the code I am using .... Is this maybe a bug or...
2

votes
0

answer
7

Views

I cannot set multiple relatives in xamarin

I need to set of my images top off one and another in order to do this I used relative layout what I need is like this menu bar to create in xamarin forms so I used code like this in another page and I include it to where ever I want But it only shows to of them one is Menu setting and all other ar...
ish1104
1

votes
1

answer
37

Views

how to reduce the code duplication in my navigation menu

I use a floating navigation menu for my project so I need it in every single page this is my code
ish1104
1

votes
1

answer
38

Views

How to disable and enable a button dynamically?

In my UWP, I have a TextBox and a Button. I want to disable the Button when the TextBox is empty. I tried this on startup- if (string.IsNullOrEmpty(hmmtxtBox.Text)) { hmmbtn.IsEnabled = false; } private void HmmtxtBox_TextChanged(object sender, TextChangedEventArgs e) { hmmbtn.IsEnabled = true; } I...
Mahmudul Hasan
-2

votes
0

answer
14

Views

Windows Form that allows user to create buttons and manipulate their grid location, content, and filepath

I need to essentially have a predefined grid and allow the user to add and remove buttons that open executable files based on user input. Originally I created a grid containing 14 buttons (2 rows and 7 columns) that open executable files using an absolute filepath. However, I need to make a progra...
Michael Webb
1

votes
2

answer
189

Views

ComboBoxItem background rainbowRGB color

Folks: I want to set the background color of a ComboBoxItem to be RainbowRGB: and this is my current xaml code. I prefer to do it in xaml code: Anyone can give some pointers? Thanks.
Ono
1

votes
2

answer
2.2k

Views

Blank screen on Xamarin

I have a Xamarin portable project. The Xaml pages I debug are totally blank and I cannot see any components on the pages on both Android and IOS. How can I fix this? Note: It gets no error messages, the pages are opening and I cannot see anything on them. The problem occured after this error. When I...
mrbengi
1

votes
2

answer
448

Views

Xamarin Forms - how to display/Bind List in ListView?

I'm creating a cart where i store all of my orders , How to display List in ListView? i tried doing these codes CustomerOrder.cs public class CustomerOrder { public string menuname { get; set; } public string price { get; set; } public string qty { get; set; } public string mcode { get; set; } } pub...
Jeremy Paul
1

votes
2

answer
69

Views

Ordering xamarin forms observable collection

In xamarin forms do I have a Oberservable collection of wordpress posts. I want to sort this collection by a specific value within this collection? How am I able to do so in Xamarin forms / c# ? I can see somewhere are people using: list.OrderByDescending(x => DateTime.Parse(x)).ToList(); But thi...
1

votes
1

answer
32

Views

Proper way to add an AutoSuggestBox to Hamburger Navigation?

I'm just starting to learn UWP and xaml. What is the proper way to add a AutoSuggestBox to the Side Navigation panel? (Sorry for the bad code formatting in advance, copy and paste wasn't great) My Main.xaml has an AutoSuggestArea that I have set to Visible and in the Grid for the AutoSuggestArea I h...
JvaOneShotzXPRX
1

votes
1

answer
1.8k

Views

Windows 8 File Access and the ms-appx:/// protocol

Is it possible to access files(e.g. images, audio and videos) in Windows 8 C# without using the 'ms-appx:///' protocol?
schiller
0

votes
0

answer
12

Views

Nested CollectionViews and display (with Visual Studio 2019, Xamarin XPlatform Android)

Nested CollectionView with scrolling one inside another : is it officially supported ? Display these collections problem Questions : (I have tried multiple configurations but without solution) 1. how can I shrink the StackLayouts to its contents ? 2. why the StackLayouts elongate greater the size of...
jmdess
1

votes
0

answer
46

Views

Why datepicker not appearing in my datagrid

Why datepicker is not appearing in my datagrid. I have textblock, one datepicker and then again textblock in total three columns, Those two textblocks appears properly but the datepicker do not appear. whereas there is no problem in binding because if a have applied same in the listview and there th...
testCoder coder
1

votes
0

answer
50

Views

When using ScrollViewer's ViewChanging event, e.IsInertial always returns false. [UWP]

According to Microsoft's documents, e.IsInertial should return true under conditions such as when the mouse wheel scrolls the ScrollViewer's contents. No matter what I do it always returns false. I need to know when the user's mouse wheel caused the ScrollViewer to scroll. ScrollViewer has a ViewCha...
LeBrown Jones
1

votes
3

answer
25

Views

Cannot remove selecteditem in DataGrid

I've a DataGrid that bound a List of contacts:
MrFantastic
1

votes
1

answer
20

Views

Image not taking whole of the space in the DataGridCell

I have a Datagrid, which shows thumbnails of some image files along with other data. I am using a converter to crop part of an image and then show that cropped image in the Datagrid. Here is the screenshot of the grid: The image is showing fine, but it is very small.If I change the width of columns...
V K
1

votes
1

answer
155

Views

Alignment of Canvas and text in canvas

So, I try to center text in a canvas, but I can't figure out how, what I'm currently doing here is this: That gets the thing done for S6, but if I set that to S66 for example, it just adds the 6 and keeps it position... I would like to keep the text in the canvas centered all the time. Also, That ca...
Robin
1

votes
0

answer
501

Views

Refresh GridView in xamarin.forms xaml

I have a GridView and each tile contains user-specific details hence I would like a refresh on this view if the user's details had to change while using the app. I've tried the following approach by adding a refresh for one of my tiles but this doesn't work. Is there any other way to achieve this fo...
Janine Alexander
1

votes
1

answer
75

Views

ComboBox missing items

I'm facing a weird problem with ComboBox. I would like to represent key combinations in a ComboBox, where every key is on a Canvas. Binding works just fine, and after initialization it looks ok, but when I click on it and expand the dropdown list the current selected item will be empty and if I cha...
Dávid Kalmár
1

votes
0

answer
67

Views

Xaml objects aren't visible in the same Content's view cs file

I created a blank xamarin forms app Shared project on Visual Studio 2017, in Content view MainPage.xaml added tags for Label, Entry and Button and named them but whenever I try to access them in MainPage.cs.xaml(same content view) Visual Studio marks them as doesn't exists in the currect context, bu...
Haytham Tahboub
1

votes
1

answer
1.2k

Views

CarouselView Xamarin Plugin not working

I am getting the following error: Error CS0234: The type or namespace name 'CarouselView' does not exist in the namespace 'Xamarin.Forms' (are you missing an assembly reference?) (CS0234) (your project) Using this on the XAML xmlns:controls='clr-namespace:CarouselView.FormsPlugin.Abstractions;asse...
Pxaml
1

votes
0

answer
228

Views

WPF- Auto Resize the popup control

I am New WPF. I have PopupControl below is XAML for that:- Issue is, I want to set auto height & width for canvas or popup control so my popup will size as per content into it.I googled and knew that canvas should have fix height or width but is there any solution(Workaround) to make popup auto siza...
Vsagar
1

votes
0

answer
287

Views

Xamarin Forms : Embeded Images not loading in Windows or iOS, but work in Android

So, I started working on my very first Xamarin Forms app and I've run into a weird issue. I've followed all the dead threads, tutorials and even the official one about embedding the images. What I have currently : I have a PCL Xamarin.Forms app. In the PCL resources, I have added the .png and have m...
Xonshiz
1

votes
3

answer
405

Views

How to handle Enter key press event on a Grid which is inside DataTemplate

I have a GridView, and inside the DateTemplate of that GridView I have a grid and for that I want to handle the enter key event to be handled. Right now I am using Tapped event and it's working fine when clicked via mouse. I also tried using Keyup and Keydown event but none of them is firing. Xaml...
Dishant
1

votes
0

answer
42

Views

An issue with CheckAll using EventTrigger on RadGridView

I am using a RadGridView to display data to users. I had added a Check All checkbox control to enable uses to select all records. For this matter, I have used EventTrigger and it's working just fine. but recently I have noticed that CheckAll would select prior pages' items displayed on RadGridView p...
Abdulkarim Kanaan
1

votes
1

answer
80

Views

ListBox contextMenu SubItem Click

I have ListBox with ContextMenu, I have configured MenuItem to works only if I click in selected item. This is XAML code: I tried to add Click event in my MenuItem but it doesn't work. Example: private void MessagesLbCopySubMi_Click(object sender, RoutedEventArgs e) { MessageBox.Show('Click event do...
xXConcasXx
1

votes
1

answer
175

Views

Xamarin Maps displays but doesn't update

I'm attempting to make a google map using Xamarin forms, the pins displays correctly and zooms in onto the user. It displays the inital map when the page starts, but when moving or zooming the map doesn't change and becomes grids if you zoom in enough. I can see my pin on the grid and everything, bu...
JsonDork
1

votes
0

answer
33

Views

Referencing resource inside usercontrol not working

I have a Wpf Application with the following structure MainSolution -> Views (folder) -> NextGenDG (WPF Project) ->DisplayResources(folder) -> BRUserControlStyles.xaml Here is BRUserControlStyles.xaml Now I am trying to use the style inside a UserControl that is inside a folder called UserControls a...
Nikhil ans
1

votes
0

answer
243

Views

Using CarouselView with a different template for each slide in Xamarin Forms

I need to make a CarouselView in Xamarin Forms where every slide has a different DataTemplate. What I have tried: DataTemplateSelector.cs: class DataTemplateSelector : DataTemplateSelector { public DataTemplate MatchEventsTemplate { get; set; } public DataTemplate CommentsTemplate { get; set; } publ...
Mr.T
1

votes
0

answer
175

Views

Xaml error when referencing internal classes in strongly-named assembly

I have a peculiar problem regarding internal classes used from xaml. The problem is as follows: We decided to strong-name all our assemblies. After the strong-naming, all but one project compiles without a hitch under VS 2017. The situation is as follows: Assembly Company.Component - Compiles withou...
Erik Nyström
1

votes
1

answer
521

Views

Effect on all buttons in Xamarin Forms

I'm trying to have a effect on all my buttons, but I can't seem to get the configuration right. this is what I have now: But this throws a Can't resolve ControlTemplateProperty on Button. Anybody has any idea on how to do this?
Kiwi
1

votes
1

answer
119

Views

Named control exists on Windows 10 but not on Windows 8.1

I have the following code in a Windows 8.1 Store App. This code runs perfectly fine on Windows 10 but crashes on Windows 8.1. The second named control in MainPage.xaml.cs is null on Win 8.1 but not on Windows 10. It's not a timing issue as the named control still won't be populated in any subsequent...
Doug
1

votes
1

answer
159

Views

Cannot change accent on materialdesigninxaml

I'm trying to add the MaterialDesign accents to a MenuItem, actually I've managed this partially, this is what I did so far: Menu creation: container definition: I defined a Color converter to display as Ellipse color: public class ColorToBrushConverter : IValueConverter { public object Convert(obj...
Steven
1

votes
0

answer
63

Views

Rendering different content for each eye in Mixed Reality

I'm currently looking to see if there is a way that within a Windows 10 Universal App, that is intended for Mixed Reality, to display different content for each eye? What would ideal is if this could be done entirely in XAML, for example... ... ... I know this can be done in a Unity App but I want t...
Nick
1

votes
3

answer
74

Views

Transform/Manipulate Value Before Displaying in GridViewColumn of ListView control (WPF)

In my XAML, I have the following GridViewColumn The binding works as expected: there is a column named DateAdded in my SQL table and it has a Unix Timestamp value per each record. When the window loads, it displays a ListView with all columns, but the Date Added column has the actual timestamp (1516...
Rushikumar
1

votes
0

answer
373

Views

WPF-Custom Popup Placement according to screen

I am New in WPF. In WPF application I have Listview. I am showing popup control for information on 'Remark' cell below is image. Poup is taking proper position on every toggle button click but in case I change the resoultion of my screen or run on someother screen it moves from its relative position...
Vsagar
1

votes
1

answer
82

Views

Button opacity does not apply

So I am trying to make a button template. However, I cannot get background opacity to work, despite having implemented it exactly the same way as for the parent container (where it works). If I completely remove the background setter from the template, then it correctly inherits from the parent cont...
Noceo
1

votes
0

answer
44

Views

Expanded TextBlock property in List.View nd GridView using WPF

I am trying to create expandable text block under every grid view column in list view. I have managed to add list resources and create C# event to collapse and expand, but I have two problems: First is as I attach it to column expand works only on this column not entire row. Second, I cant bind text...
Wojciech Szabowicz

View additional questions