Questions tagged [initializecomponent]

61 questions
2
votes
0 answers

C# WinForm takes times for Initializecomponent()

I am working on C# application where i am using "Telerik" controls to design the form. I have 5 tabs in Ribbon control having around 15 controls in each tab. The main problem arise when i run the code. It takes some time to load all the controls, it…
Cheetah
  • 86
  • 8
2
votes
2 answers

Implement Reusable elements in xamarin forms

Iam trying to define reusable components in my xamarin app. My intention is to use same xaml in multiple files. For example, I need to define common header for my app. I tried to implement this in following way : Define required xaml in separate…
user3165999
  • 149
  • 4
  • 11
2
votes
0 answers

WPF: InitializeComponent doesn't exist for User Control

Another WPF question/problem. I have made a User Control (called Edit). Problem is that upon building (and also in the editor), I get the following compile error: "The name 'InitializeComponent' does not exist in the current context." I also note…
Holland
  • 395
  • 9
  • 22
2
votes
0 answers

How to improve InitializeComponent() performance in C# WPF

I develop a C# WPF application using DevExpress controls. I have a DXRibbonWindow as mainwindow which includes several complex usercontrols. My problem is that the InitializeComponent() method of the mainwindow takes up to 9 seconds to finish. So…
Kimbo
  • 29
  • 1
  • 5
2
votes
1 answer

InitializeComponent equivalent for xaml

In some of my smoke tests, I'm using Mono Cecil to parse the opcodes of my assemblies. I then perform some operations to validate code quality, etc. However, I don't really care about generated code in designers because there isn't much I can do…
Devin
  • 1,014
  • 1
  • 9
  • 28
2
votes
2 answers

Are generic UserControls and generic Dependency properties possible?

I have an abstract generic class that defines a generic dependency property the type of which is to be defined by subclassing classes. This property is somehow not recognized as a dependency property so that I get an error message during runtime…
Bastian
  • 4,638
  • 6
  • 36
  • 55
1
vote
0 answers

How to modify code written in InitializeComponent method (WinForms Designer generated code)?

I'm a WPF developer and have to perform some task in WinForms (I'm a total newbie of WinForms). Unlike in WPF, I've noticed that the InitializeComponent method in WinForms is generated by the Windows Form Designer, and obviously I can't modify the…
Cod Fish
  • 917
  • 1
  • 8
  • 37
1
vote
0 answers

Winforms appearance at 100%,125%,150% Windows scaling modes, and alleviating need to constantly edit Designer.cs class every time I update the GUI

I'm developing in Winforms with a .NET 4 profile in Visual Studio 2010 at Windows' 100% scaling (96dpi) on Windows 10. As per the advice from this highly rated answer, I set dpiAware to true in the app.manifest file, set the AutoScaleMode of the…
Dan W
  • 3,520
  • 7
  • 42
  • 69
1
vote
7 answers

Getting error: "The name InitializeComponent does not exist in the current context", in every xaml.cs class (Xamarin Forms)

So suddenly the common error "The name InitializeComponent does not exist in the current context" appeared in every single xaml.cs class in all my solution, I have tried multiple common solutions to this issue but none of them seems to work. A…
Jaime Santos
  • 437
  • 2
  • 10
  • 21
1
vote
1 answer

UWP crashes at InitializeComponent() [C++]

This is the weirdes error I've gotten so far while working on UWP. I was happily working when I ran my code to check some new changes. After the app executed the InitializeComponent() method it crashed. I went on the debugger mode and tried to…
1
vote
1 answer

The code within the method 'InitializeComponent' is generated by the designer

The code within the method 'InitializeComponent' is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again. I am a newbie at this so please bear with me. I copied and pasted…
user6906550
1
vote
0 answers

Xamarin Forms InitalizeComponent call does not initialize page controls

I have a pretty straightforward page that has a few controls on it. My problem only occurs on an actual device and only occurs on my Lumia 1520 running Win10 Mobile version 1607 Build 10.0.14946.1000. It does not happen on my Lumia 950 running…
1
vote
1 answer

Xamarin.Forms app crashes with FileNotFoundException in InitializeComponent

My Xamarin.Forms app keeps crashing when I open a specific page. The crash is reproducible, but only in Release mode. When I build and run the app in Debug mode, the same page opens fine. With some effort I managed to catch the exception and display…
LWChris
  • 3,320
  • 1
  • 22
  • 39
1
vote
2 answers

Xamarin.Forms Windows 10 Universal Error "CS0103 InitializeComponent does not exist"

I have a working Android Project with a .Droid-Solution and a SharedProject. I started the App on my phone and it works great. Now, I just added a blank Windows 10 Universal Solution and did the instructions here:…
SPI
  • 93
  • 12
1
vote
1 answer

Is it possible to create objects of MainPage class in silverlight webapplication using c#

I am c# web application beginner using silverlight 5. before i was working on c# console applications and there i had body of code working like this. namespace check { public class main { public void FunctionDefinition1() …
Sss
  • 1,519
  • 8
  • 37
  • 67