Questions tagged [initializecomponent]
61 questions
0
votes
1 answer
IntializeComponent keeps getting overwritten
I have some conditionals in my InitializeComponent which affect the layout based on some variables. Unfortunately, it seems like whenever I rebuild my application, this code is reverted back to its previous state. Is this code being regenerated…

Alec Sanger
- 4,442
- 1
- 33
- 53
0
votes
1 answer
UWP Initialize components not recognised after clean System.Xaml could not be found
So I got a problem with my UWP project after I cleaned my project... The InitializeComponent() method was no longer recognized and found by Visual Studio, so I was not able to build and so on...
I've been searching the whole day and did'nt find…

MelloPs
- 135
- 11
0
votes
1 answer
dispose() and initializeComponent() method in C# make problems
I'm new to c# and have a problem with the methods i've told you in the title. the code is a little bit long so i posted it to pastebin. i'm using the 32feet.net api to list up bluetooth devices in a list.
the problems are in line 43 and 50 with the…

Andre
- 9,000
- 5
- 26
- 32
0
votes
1 answer
Multiple InitializeComponent for a winform
We have a highly compact winform with over 180 controls placed in it .
Most of these controls are dynamically placed , some are displayed /hidden based on some preferences.
As a part of optimizing the code i have decided to split the…
0
votes
0 answers
InitializeComponent not defined after converting from Windows phone 8 silverlight to universal apps
I have a Windows phone 8 Silverlight App that I'm trying to convert to Windows Universal Apps. I used a free tool from this website http://www.mobilize.net/silverlight which helps with the transition but I've encountered a weird error.
I've already…

rickrvo
- 543
- 3
- 17
0
votes
1 answer
InitializeComponent asynchrounously
Is it possible to make asynchronous InitializeComponent? Otherwise could I load my WPF component asynchronously? More specifically I'm currently developping a product in WPF and I noticed that the loading time of graphical components (some…

frank001
- 9
- 7
0
votes
1 answer
WPF C#: Starting crash due to client 'Region and Language' settings
I'm working on a WPF C# application, and it seems to crash with a few random people.
So eventually I found out it was the 'Region and Language' settings that was responsible.
For example, if I were to set my Format to English (United States) it will…

Rik De Peuter
- 703
- 2
- 9
- 24
0
votes
1 answer
XAML child window subclass: "InitializeComponent shadows member in base class." How can I resolve this warning without modifying autogenerated code?
I have added two windows to a Silverlight 5 application project: FooWindowBase and SomeFooWindow. The latter is a sub-class of the former. Both contain a default constructor calling InitializeComponent, and apparently Visual Studio or the compiler…

stakx - no longer contributing
- 83,039
- 20
- 168
- 268
0
votes
2 answers
initializecomponent() don't exist in current context while using generics in c# web application
I am trying to create a generics in c# web application and using silverlight-5. This i have already implemented in c# console application.
I am trying to do same in webdevelopment using asp.net,c# and silverlight (and GUI using xaml) in Vs-2010.…

Sss
- 1,519
- 8
- 37
- 67
0
votes
0 answers
"InitializeComponent" does not exist -error when changing the codebehind file for a .xaml page
I have multiple xaml pages that have common functionality and I need to create a single .cs file to use them. So I commented all the code in my .cs for the .xaml and created a new .cs file to handle my "Test" page's functionality.
I followed the…

user3340627
- 3,023
- 6
- 35
- 80
0
votes
0 answers
How can I initialize the same Windows Form with different control elements depending on different conditions?
I have been knocking my head over this for a few days now, and I can't seem to come up with a solution.
I'm creating a WinForm as part of an application that will have to use two different kinds of ActiveX controls depending on what peripheral…

Paulo C.
- 1
- 1
0
votes
2 answers
New WPF Project Won't Compile -- Throws Error "The name 'InitializeComponent' does not exist in the current context"
I'm getting started with WPF, but when I create a new WPF project (usuing all default options) it won't compile after VS generates the project. (Both under C# and VB) I believe I'm running the latest/greatest VS (which is maybe the…

Jeff
- 8,020
- 34
- 99
- 157
0
votes
1 answer
Using DataTables from Database to populate program on startup without getting System.IndexOutOfRange messages
Hi Everybody and THANK YOU IN ADVANCE!! for any and all help
I am an absolute newbie to coding and programming (4-5months)
I am using visual studio 2012 and coding in C#
I am making a windows form application that connects to a database in SQL…

CodeKuga88
- 51
- 10
-1
votes
1 answer
Proper way of initializing components
The VS IDE has automatically created a designer class which is fine. I want to parse a text file and initialize the .text value of every component based on a user setting on runtime. It seems impossible to do it inside the designer.cs file as it is…

tcop
- 381
- 1
- 2
- 11
-1
votes
1 answer
c# Delete dialogresult
How can I delete DialogResult object ?
I am using it as a confirmation for clearing form (removing all controls and reinitializing of controls). The problem is that when I hit yes it recreates the second DialogResult, then third one, then fourth,…

marhyno
- 677
- 1
- 8
- 20