Microsoft
Software
Hardware
Network
Question : Access a connectionstring from app.config in xaml file for WPF application
I want to access a connection string defined in my app.config file to initialize a control in a .xaml file in a WPF appliction but can't quite figure out how to do it. I could set the value in the loaded event but I really want to keep all the initialization together in the .xaml file.
Below is my app.config
providerName="System.Data.
OracleClie
nt" />
and here is an example of a customer user control I wrote that has a connection string property exposed.
ConnectionString="Data Source=XXXXXX;Persist Security Info=True;User ID=XXXX;Password=XXXXX; Max Pool Size=400">
I want to be able to access the connectionstring and the DefaultAuctionID from the app.config in the .xaml file.
Answer : Access a connectionstring from app.config in xaml file for WPF application
Take a look at this link for informaiton on how it can be accomplished in xaml:
http://weblogs.asp.net/psh
eriff/arch
ive/2009/1
0/19/bindi
ng-
to-conf
ig-setting
s-in-wpf.a
spx
Random Solutions
Help with OnTime Event
odbc problem (sqlexec, sqlconnect)
Bad email locks up Outlook Express, can't move or delete
Export table to another Access DB
I want to hyperlink a image in pdf using vb.net code using iTextSharp.text and Imports iTextSharp.text.pdf class
nVidia nForce Raid controller embedded in Proliant ML115 G5 Event 129
how can I compare two databases in foxpro to check if they are identical?
VBA - IF Condition and Fill Down, added to existing code
Deletion of record - But HOW ? Very odd.
VIEWING INTERNAL WEB SITES WITH FOREFRONT TMG CLIENT