|
I have created a WPF control, which I want to deploy to the user.
I need to create an installer for this control. Installer should create a custom tab in VS toolbox and place the control inside that tab, the way it is done by other WPF control installers (e.g., Telerik).
Any help/idea?
|
|
|
|
|
|
Many thanks for your reply. I tried google before asking question here, but none of them (including this one) could fulfill my requirement.
When I install Telerik with the help of their EXE, it just installs everything without being specific to any application. It puts that control into a specific tab in VS toolbox and also places it into 'Assets' tab of 'Expression Blend' without asking any question.
This .vsi file, including dialog box and messages, seems to be specific to Visual Studio and asks questions before installing.
|
|
|
|
|
This [^]could help you as well.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
Good Day All
I have another question. I have a Silverlight application and in one of the Silverlight pages i am hosting an Asp.net Page using a RadhtmlContainer(Telerik). I created a Cookie in Silverlight like this
public static void SetCookie(string key, string value)
{
DateTime expiration = DateTime.UtcNow + TimeSpan.FromDays(2000);
string cookie = String.Format("{0}={1};expires={2}", key, value, expiration.ToString("R"));
HtmlPage.Document.SetProperty("cookie", cookie);
}
and i have the same generic function to access it like this
public static string GetCookie(string key)
{
string[] cookies = HtmlPage.Document.Cookies.Split(';');
key += '=';
foreach (string cookie in cookies)
{
string cookieStr = cookie.Trim();
if (cookieStr.StartsWith(key, StringComparison.OrdinalIgnoreCase))
{
string[] vals = cookieStr.Split('=');
if (vals.Length >= 2)
{
return vals[1];
}
return string.Empty;
}
}
return null;
}
so i am trying to access this cookie in an asp.net page that is hosted on the the html Container , but i dont find the cookie.
Basically what i want to Achieve is
i want to access a value that is being created in Silverlight e.g "userid" "Username" normally i store it in the Cookie , so now i want to do a database insert , i need to do that insert from that asp.net page, but i cant get hold of that cookie value.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
What do you see in HtmlPage.Document.Cookies when you enter the GetCookies method? It would really help if you set a breakpoint there and told us what was in that part? Plus, and I know this seems obvious, but make sure that the SetCookie method is called before you call GetCookies.
|
|
|
|
|
Good Evening Pete
Thank you for your kind response.
The First thing i do is to set the Cookie when the User has Just Logged in and after that that the User will be redirect to a Welcome page. There are Menu's that are visible for the User to select , and one of them will lead to a Silverlight page that will require the Cookie value that has been set at Login.
So the above explanation your last point that i should first set the Cookie and Access it later
To answer the first question about the htmlpage.Document.Cookies , it has an empty string i am not sure why.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
From your description, the cookies are added by the website and not by Silverlight. It looks like you are trying to read the cookies created in the ASP.NET side, in your Silverlight code. According to MSDN[^], Cookies are disabled by default for security reasons. Use WebClient instead.
|
|
|
|
|
Can you pass the cookie value into the silverlight app as an initial parameter?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
the thing is i want the value out of Silverlight to aspx
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
I have a SL site that is structured like
Corporate
- Company1
- Company2
- Company3
- Company4
Entry to the site is www.corporate.com
Each company now wants to basically skin their area of the site with thier company identity and to access their area directly skipping the corportate.com page. I know I can change skins (never having built a skin this is an assumption) so what is the recommended method of going directly to the company pages based on the URL.
All will use the same xbap, wcf and database it is just the entry point for the companies.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: what is the recommended method of going directly to the company pages based on the URL.
Easy using navigation![^]
Mycroft Holmes wrote: All will use the same xbap
XBAP? That's WPF...and not even recommended anymore
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Easy using navigation![^]
Pfft alreay half way there I implemented navigation right from the start, just never went past the minimum required for our needs. thanks...
Mark Salsbery wrote: XBAP? That's WPF...and not even recommended anymore
What, that's what lives in my clientbin folder and thats what gets deployed (along with the dafault.aspx), when did they go out of fashion, link required. Your had better mean you are taking the mickey or I've got some serious reading to do.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: What, that's what lives in my clientbin folder and thats what gets deployed
Ohhh the XAP? XBAPs are WPF browser applications...Silverlight is recommended over XBAPs, although you can still do them.
And the smiley was just because I was nit-picking terms but not real seriously...
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Oops - did not even notice the mistake thank ghu I thought I may have completely screwed up.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
It turns out that the link does not actually help me, I don't expose the url eg www.corporate.com?companyid=1 However I guess I should be able to use mymapper to hard code the url. Pick up www.corporate.com/CompanyName in mymapper and deal with it.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
The domain "www.corporate.com" doesn't need to be in the code, does it?
According to your original post, you should only need something like this
<navigation:Frame.UriMapper>
<uriMapper:UriMapper>
<uriMapper:UriMapping Uri="/Company1" MappedUri="/Views/Company1.xaml"/>
<uriMapper:UriMapping Uri="/Company2" MappedUri="/Views/Company2.xaml"/>
<uriMapper:UriMapping Uri="/Company3" MappedUri="/Views/Company3.xaml"/>
<uriMapper:UriMapping Uri="/Company4" MappedUri="/Views/Company4.xaml"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
or better yet, to not hard-code company names in the code...
<navigation:Frame.UriMapper>
<uriMapper:UriMapper>
<uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
</uriMapper:UriMapper>
</navigation:Frame.UriMapper>
Mark Salsbery
Microsoft MVP - Visual C++
modified on Wednesday, May 25, 2011 4:36 PM
|
|
|
|
|
How do you eliminate the # requirement. Currently the nav wants
www.Corporate.com/#Company1
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
If you create and build a SIlverlight Navigation Application from the visual Studio project templates and run it, you'll see there's no "#" requirement.
I'm not sure where that would come from
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mycroft Holmes wrote: I know I can change skins (never having built a skin this is an assumption
Good assumption - yes you can[^].
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
Hi all,
I am still digging into WPF and last night have a look around with User Controls.
If I said that User Controls are more likely the templates, where I can reuse later time, what you think? Any comments really appreciate.
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|
|
I personally would not associate UserControl with the word "template" in WPF/Silverlight, since a "template" in these frameworks has a specific meaning.
Some info on UserControls compared to other controls... Control Authoring Overview[^]
*edit* fixed link
Mark Salsbery
Microsoft MVP - Visual C++
modified on Wednesday, May 25, 2011 5:06 AM
|
|
|
|
|
Thanks for the reply.
May be that I have not enough experience with WPF. I agreed with you, comparing with ASP.Net and so on, word template is not relevant. Basically it has a different meaning.
Why I wonder is that I can use the same XAML in different places as well. Is there anything in WPF named as 'templates' ?
Thanks for the link as well, sounds good it is.
I appreciate your help all the time...
CodingLover
|
|
|
|
|
CodingLover wrote: Is there anything in WPF named as 'templates' ?
Oh yes!
Styles and Templates[^]
(fixed link in post above)
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Mark Salsbery wrote: Oh yes!
Let see, still I'm working on with user controls.
Mark Salsbery wrote: (fixed link in post above)
Thanks
I appreciate your help all the time...
CodingLover
|
|
|
|