Access MyProject.MySettings.Default.SomeSetting From Xaml?

Apr 22, 2010

I have defined a StringCollection in the Project Settings.I want to use the values in a ComboBox.Is there a way to access it xamly?

I tried:
<CollectionViewSource Source="{x:Static src:MySettings.Default.MyCollection}" />
<CollectionViewSource

[code]....

View 2 Replies


ADVERTISEMENT

Authentication - .NET - Accessing MySettings.Default Changes Thread.CurrentPrincipal?

Nov 14, 2011

It appears that when you access My.Settings.Default in VB.NET, your thread's CurrentPrincipal changes. Consider the following code.

[Code]...

Is this expected? Is it documented anywhere? I couldn't find any references to it.It also seems to only do this the first time My.MySettings.Default is accessed, which means that a workaround might be to touch the property to initialize it before attempting to set the thread's CurrentPrincipal. Would there be any undesirable side effects to doing that?

View 1 Replies

'User' Is Ambiguous Between Declarations In Modules 'My.MyProject' And 'My.MyProject' In ASP.NET File System Web Application

May 21, 2012

I am getting the error: 'User' is ambiguous between declarations in Modules 'My.MyProject' and 'My.MyProject'.I am trying to debug an ASP.NET web application compiled as a file system project. Obviously the namespaces in question are in-built Microsoft namespaces so there is no way to change anything here nor change any class definitions.

View 2 Replies

File I/O And Registry :: Post Build Event To Change Myproject.dll To Myproject.gha?

Mar 6, 2010

I am using VS 2005 and want to write a post build event that renames the build output from MyProject.dll into MyProject.gha. I know how to get to the post build event command line, but unsure of exactly what to do from there. I think that I use $(TargetExt), but unsure of syntax, etc..help?

View 3 Replies

Xaml Writer How To Remove Xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

Sep 17, 2009

I need to use the xaml writer to convert in string some controls. What I get is a string like this for example

[code]...

View 1 Replies

FavoriteDataSet' Is Not A Member Of 'MyProject.Form1?

Jan 19, 2011

I have been working on this app for probably more then a month.Things were going well and without ANY problems then all of a sudden I recieved warnings: '_MyFavoriteDataSet' is not a member of 'MyProject.Form1'.

These warnings then turned into 26 errors and 5 scary warnings like:"Could not find type 'MyProject.CalendarColumn'. Please make sure that the assembly that contains this type is referenced.All I was working on the time of explosion was setting a filter on a different dataset.

What the heck!!! Is there a way to fix this. I can't simply start over at this point.

View 5 Replies

How To Update MySettings Properties

Feb 17, 2012

My.settings Properties are Read-Only. How can these be updated in program code?

View 4 Replies

Change Path To Save Mysettings?

Apr 15, 2010

I am using mysettings to save user settings.

This config file is saved in this path:

c: Documents and
Settings [Local
Settings] Application
Data\

Is possible to change this path? For example, in my case I save app data in "ProgramData" folder (Vista & W7) and I would like save this config file in the same folder.

View 1 Replies

Save Settings In App.Config And My.MySettings?

Dec 23, 2010

Private Sub SaveButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles SaveButton.Click
Dim Config As Configuration
Dim Section As ConnectionStringsSection

[code]....

View 4 Replies

Store 2-dimensional Array In MySettings?

Nov 5, 2009

I want to store a 2-dimensional array with 5 columns and indefinite rows in My.MySettings. I've tried to use a Class with an item list (list(of T)) but also a StringCollection.

View 15 Replies

IDE - Unable To Read The Project File 'MyProject.vbproj' ?

Jun 14, 2012

I'm gearing up to work on a project which is migrating from VB6 to .NET 4.0. I have Visual Studio 2010 but wanted to try and open the original source code using the VB6 IDE. Can one still acquire this anywhere?I checked here:http:[url].... I have tried opening the original vb project file by changing the suffix from vbp to vbproj (let's call it MyProject.vbproj) but it just says it cannot interpret the file:

Unable to read the project file 'MyProject.vbproj'.

View 2 Replies

Put Form Size In The Mysettings Of Vb2010express Application?

May 19, 2010

I've been tortured with this question for few days. As I understood, you could put some of form's properties to mysettings, actually binding them with some named values as strings.It's not very hard, and it was well documented. I tried it and it works fine.Only, not all properties are offered to be bound with mysettings, only some of them. For example, you could bind starting position and windowstate, close your application, and when you open it again, it will open the same window on the same place on the

View 4 Replies

Switching Database Dynamically - MySettings.Connection

Oct 20, 2011

I have a connectionstring in MySettings which all my datasets use. The project has three copies of the same database: LIVE, WHATIF and TEST. I need to have a dialog in my startup that asks the user which db they want to use and then I thought I could amend MySettings.Connection string dynamically. Hey-ho it's read-only! Is there any other approach I can use where I change a connection string once and all my datasets will then point to the selected db?

View 3 Replies

VS 2008 Save Combobox Items In MySettings?

Jun 15, 2009

Well currently I'm needing to store various settings, strings, integers, items, etc, within the program settings. So far this has gone without a snag and is working as planned except for one thing, Comboboxes. I have browsed through the various types of settings I can save to and the closest is a "System.Collection.Specialized.StringCollection", however VB is throwing up an error saying that:

Quote:

Error1Value of type 'System.Windows.Forms.ComboBox.ObjectCollection' cannot be converted to 'System.Collections.Specialized.StringCollection'.C:UsersUserAppDataLocalTemporary ProjectsProjectForm1.vb1234Project

How would I go about saving the items in a Combobox?

View 6 Replies

Project 'MyProject' Requires A Reference To Version '14.0.0.0' Of Assembly 'Microsoft.Office.Interop.Excel'

Apr 14, 2011

I have Visual Studio 2010 and a VB Project that had a reference to Microsoft.Interop.Excel 12.0. Well recently I changed the reference version to 14.0. That was actually a mistake and now I need to bump it back down to version 12.0. However I get this error in my project now...

Project 'MyProject' requires a reference to version '14.0.0.0' of assembly 'Microsoft.Office.Interop.Excel', but references version '12.0.0.0'
of assembly 'Microsoft.Office.Interop.Excel'.

I tried removing references and adding the com object to, but no avail.

View 1 Replies

Visual Studio 2010 - Designer - Type 'MyProject.MyResources.Resources' Has No Property Named 'myicon

Jun 17, 2012

Long story short I made a form in VB.Net project which involves lots of icons and images. My problem is when I build my project, and then go back to that form, suddenly errors showed up.

The errors says : "The type 'MyProject.MyResources.Resources' has no property named 'myicon'". Just to be clear, it worked fine before I did the build, and it happened to every single images I have on Resource.

When I chose "Ignore and Continue" all of the images I used are gone. I tried to googled it, some says to delete my .exe file on Application/Bin/Debug folder, which is working. But this issue has been some kind of an annoying one, since it happens again every single time I build.

View 1 Replies

Insert Record Into Access Table - Parameter Has No Default Value

Jan 30, 2010

I am trying to do an insert into a table called Policy. I keep getting an error that says parameter @Split has no default value. To try and resolve the problem, I set the default value of the split field (of type text) in the Policy table to "0" in Access 2007. I am passing in the value of a string "0" into the parameter before the insert statement executes.

Dim connection As OleDbConnection = PaulMeadeInsuranceDB.GetConnection
Dim insertcommand2 As New OleDbCommand(insertStatement2, connection)
connection.Open()

[Code].....

View 1 Replies

Access 2007 And Stored Procedure Error: Parameter [@MyNumber] Has No Default Value

Jul 27, 2010

Access 2007 and Stored Procedure. I keep getting this error: Parameter [@MyNumber] has no default value.

[Code]...

View 3 Replies

Asp.net - Auto-redirect User To Default.aspx If They Directly Access Any Page Of Website?

Feb 28, 2011

I have the following pages structure in my asp.net 3.5 website ...i want if anybody directly access any page of my site as [URL] then it will automatically redirected to [URL] How to do this using vb.net, asp.net

View 2 Replies

Using The Xaml.cs Or Xaml.vb?

Jan 8, 2012

I have been watching "absolute video tutorial". In those tutorials when doubled clicked on stuffs like "button" or "textbox", a code page appears named as "mainpage.xaml.cs" but when I use Visual Basics and do the same, on double click a page "mainpage.xaml.vb" appears. In this the coding stuffs are different. And when I write the same codes like in tutorial I get errors.

View 6 Replies

Deployment :: Give Admin Or Write Access To App When Its Installed To Default Program Files Directory

Feb 5, 2010

I am deploying my application on a 64 bit windows 7 system (setting the platform property to x86) , after the installation process the app needs to set its connection string in the config file; and this is where I am having issues, the app is not able to write to the config file if/when its located under the program files directory (no admin privileges??), the app works fine when installed on a public folder.Please let me know how to give admin or write access to my app when its installed to the default program files directory

View 2 Replies

My.Resources In WPF XAML?

Sep 14, 2009

Is there a way to access My.Resources thru Xaml?

Like this

<Image Source="{Binding MyImage,
Source={x:Static my:Resources},
Converter={StaticResource MyBitmapToImageSourceConverter}}" />

[Code]....

View 2 Replies

VS 2008 'MyNumber' Is Not A Member Of 'MyProject.MyNumber'

Dec 25, 2009

I have two classes

Class 1

Public Structure MyNumber
Public MyNumber As Integer

[Code].....

'MyNumber' is not a member of 'MyProject.MyNumber'.

View 2 Replies

Animate Gridlength In XAML?

Jul 27, 2009

I was just wondering if it's possible to animate the height of a grid using purely XAML? I looked at this tutorial[url]...

View 2 Replies

C# - WPF: Binding TreeView In XAML

Dec 8, 2010

I have a data source:

[Code]....

View 2 Replies

Wpf - Bind More Than One ObservableCollection In XAML

Feb 4, 2012

How can I implement both of these ObservableCollections in my xaml? I want to have a listview with all my students, and another listview with all my teachers.For now I just made an example student and teacher object. Am I going about this the wrong way. Eventually I will pulling from a datatable, not sure how I would implement it to the ObservableCollection though.

Public Class PersonalViewModel
Public Sub New()
Dim obcollection1 As New ObservableCollection(Of Student)

[Code].....

View 1 Replies

Wpf - Programmatically Set Height Of Row In XAML?

Jul 26, 2009

I'm doing a WPF project and decided to try it out with Visual Basic. So, basically I'm trying to set the height of a row in a Grid. I'm not great at programming but with C# I managed somehow to figure it out, without remembering how. It actually looks like an animation because when clicking the button, the height of one row smoothly goes down to 0. But I'm trying to even reach that property and I can't figure out the context. The row is called "AnimationRow" and I can reach that, but where do I set the height?

View 1 Replies

Wpf - XAML Code For TREEVIEW?

May 14, 2011

Following is the code I wrote for generating treeview hierarchy,

For Each k As KeyValuePair(Of String, GenreSet) In GenreSetDictionary
Dim t As New TreeNodeSet
t.Genre = True

[code]....

View 1 Replies

WPF And XAML Free Tutorials

Oct 7, 2009

I am new to WPF and XAML. I want to learn these for use in VB express 2008.Please guide me for some tutorials to start and progress in WPF and XAML.

View 3 Replies

.net - Accessing Class Properties In Xaml?

Feb 18, 2010

I've currently created the class below. For some reason though I can't access the properties I've created through my xaml style.

Public Class Ribbon : Inherits Button
Private mpopDropdown As Popup
Public Property Dropdown() As Popup

[Code].....

but they don't seem to expose the property either. I've also tagged the property as <Bindable(True)> but that didn't seem to do anything.

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved