Questions tagged [contentview]

39 questions
4
votes
2 answers

Dependency Injection into ContentView (Code-Behind) with Parameters

in my .NET MAUI MauiProgram.cs, I registered a ResourceManager and also the Code-Behind of my ContentView named MyContentView (which refers to MyContentView.xaml.cs): Parts from MauiProgram.cs ... var builder = MauiApp.CreateBuilder(); builder …
OXO
  • 391
  • 1
  • 8
4
votes
1 answer

Is there a way to load swiftUI view into NSView?

I would like to know if it's possible to load a SwiftUI view into an NSView. I was hoping to set the windows content view to aSwiftUI but it seems impossible window?.contentView = view where view is of swiftUI
Tochukwu
  • 190
  • 1
  • 11
3
votes
1 answer

Layout render error when using Tasks modifying controls

Description Hello, Rendering of Layouts are not updated if they contains controls (ContentView) with some rendering Task ! I created a simple ContentView which contains three Image (the FireControl in the screenshot). In the constructor, I use a…
SpaaJ
  • 61
  • 6
3
votes
1 answer

How can I add in a template object into a C# Frame template

Here is code I have been working on with the help of Deczalof: Here is the XAML code that I have With code behind: public partial class CopyDeckPopup :…
Alan2
  • 23,493
  • 79
  • 256
  • 450
2
votes
1 answer

reusable contentview .NET MAUI

Simply, I have a contentview such as;
Ender KARADAG
  • 87
  • 2
  • 11
2
votes
1 answer

Corner Radius of both HStack and TextField not updating

This is the code for my content view. As you can see, I've tried both an HStack to contain the TextField, as well as just the TextField on its own. The corner radius doesn't have any bearing on the grey search rectangle - the edges are still…
1
vote
1 answer

MAUI ContentView can't inherit from custom base class

I have a ContentView called HomePageOrientationViewLoader that I want to use in a ContentPage called HomePage. HomePageOrientationViewLoader will either load a ContentView called HomePageLandscape if the orientation is in Landscape or a ContentView…
David Pugh
  • 758
  • 3
  • 12
  • 33
1
vote
0 answers

How to prevent focus going to whole ListViewItem when the item's content view is clicked

I have created a Xamarin ListView sample with customized item template. When I clicked the content view in the item template focus is applied for the list view item instead of that content view in item template. How to restrict the focus for the…
1
vote
0 answers

NativeView's FlowDirection has changed when changing background at run time

I'm preparing sample project in MAUI and in my sample, i'm changing background of native view (ContentViewGroup) by setting MauiDrawable to it's background property. var selectionBackground = new…
1
vote
1 answer

SwiftUI: Sheet gets dismissed immediately after being presented

I want to have a fullscreen SwiftUI View with a button in the Navigation Bar, which presents a SwiftUI Sheet above. Unfortunately, the Compiler says: "Currently, only presenting a single sheet is supported. The next sheet will be presented when the…
MunichCoder
  • 143
  • 1
  • 9
1
vote
1 answer

SwiftUI check if URL is reachable and switch to ContentView automaticly

I tried this to check the status of connectivity : func checkConnection() { if let url = URL(string: "https://www.xxxxxxxxxxxxxxxxxxxxx") { var request = URLRequest(url: url) request.httpMethod = "HEAD" URLSession(configuration:…
1
vote
2 answers

SwiftUI ContentView Loop Issue - Thread 1: EXC_BAD_ACCESS

So, for this app I need to make a custom styled tabview and I've started with the code below import SwiftUI enum Tab{ case first case second } struct ContentView: View { @State private var selectedTab: Tab = .first var body: some…
saxonsxexe
  • 97
  • 5
1
vote
1 answer

How to open a ContentPage from a ContentView?

I have a Xamarin.forms.Maps in a ContentView and I am using that view in a ListView. I need to open a new page when clicking the map. I tried like below: MapClicked="MapClicked" private async void MapClicked(object sender, MapClickedEventArgs e) { …
Sreejith Sree
  • 3,055
  • 4
  • 36
  • 105
0
votes
1 answer

When I click somewhere other than the button in ContentView, it goes to a different place

In my application, I created a scrollView and set the width of this scrollView to twice the width of the screen. Then I created two contentViews. (contentView1 and contentView2) I use these contentViews as two screens. When I click on the "YENİ…
0
votes
1 answer

Where to instantiate the viewmodel of a .NET MAUI ContentView with bindable properties?

I've a ContentView in .NET MAUI with two bindable properties: ListData and ListType. ListData is of type string and contains a serialized JSON object. ListType is a string whose value controls the appearance of the list. The ContentView itself…
Rolf
  • 191
  • 1
  • 4
  • 13
1
2 3