Click here to Skip to main content
15,868,014 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: WPF Editable ComboxBox Question Pin
SledgeHammer0116-Sep-12 10:15
SledgeHammer0116-Sep-12 10:15 
GeneralRe: WPF Editable ComboxBox Question Pin
Kevin Marois16-Sep-12 10:25
professionalKevin Marois16-Sep-12 10:25 
QuestionWPF Datagrid linked to URL Pin
abollmeyer13-Sep-12 18:14
abollmeyer13-Sep-12 18:14 
AnswerRe: WPF Datagrid linked to URL Pin
Pete O'Hanlon13-Sep-12 20:52
subeditorPete O'Hanlon13-Sep-12 20:52 
GeneralRe: WPF Datagrid linked to URL Pin
abollmeyer13-Sep-12 22:50
abollmeyer13-Sep-12 22:50 
GeneralRe: WPF Datagrid linked to URL Pin
Pete O'Hanlon13-Sep-12 23:23
subeditorPete O'Hanlon13-Sep-12 23:23 
GeneralRe: WPF Datagrid linked to URL Pin
abollmeyer14-Sep-12 21:42
abollmeyer14-Sep-12 21:42 
QuestionUN Register Scriptable Object Pin
Marc Vandeputte13-Sep-12 7:07
Marc Vandeputte13-Sep-12 7:07 
This is probably an unusual question as I cannot find anything that makes me think that what I want to do is common practice but not doing this causes a memory leak.

The reason for registering a scriptable object is to be able to use the unbeforeunload method (JavaScript) at application exit. This is only needed at a very specific and brief time during the application lifetime after which I would like to cancel the registration of the scriptable object as it only causes to keep the page (this instance) alive in memory for the rest of the app lifetime. Unregistering (removing the key) and re-registering when it is needed again would solve the problem. I just don't know how to do it.
Here is the code :
XML
<pre>Application app = Application.Current;
            if (!app.IsRunningOutOfBrowser)
            {
                HtmlPage.RegisterScriptableObject("Page", this);
}

[ScriptableMemberAttribute]
        public string LeaveRequested()
        {
                //method run before unload
        }

        [ScriptableMemberAttribute]
        public bool PreventLeave()
        {
            return (bool)PreventLeaveCheckBox.IsChecked;
        }</pre>



This works like a dream when it's needed, but it's a nuisance when it's not required.

Thanks for any help in advance.
AnswerRe: UN Register Scriptable Object Pin
Clifford Nelson13-Sep-12 8:34
Clifford Nelson13-Sep-12 8:34 
GeneralRe: UN Register Scriptable Object Pin
Marc Vandeputte13-Sep-12 10:41
Marc Vandeputte13-Sep-12 10:41 
GeneralRe: UN Register Scriptable Object Pin
Clifford Nelson13-Sep-12 11:19
Clifford Nelson13-Sep-12 11:19 
QuestionWCF error - CommunicationException: Error in deserializing body of reply message for operati Pin
vanikanc12-Sep-12 15:33
vanikanc12-Sep-12 15:33 
QuestionWpf Datagrid Pin
sudeep kushwaha12-Sep-12 2:38
sudeep kushwaha12-Sep-12 2:38 
AnswerRe: Wpf Datagrid Pin
Pete O'Hanlon12-Sep-12 3:03
subeditorPete O'Hanlon12-Sep-12 3:03 
GeneralRe: Wpf Datagrid Pin
SledgeHammer0112-Sep-12 11:55
SledgeHammer0112-Sep-12 11:55 
AnswerRe: Wpf Datagrid Pin
Clifford Nelson12-Sep-12 12:19
Clifford Nelson12-Sep-12 12:19 
GeneralRe: Wpf Datagrid Pin
SledgeHammer0112-Sep-12 12:27
SledgeHammer0112-Sep-12 12:27 
AnswerRe: Wpf Datagrid Pin
Clifford Nelson12-Sep-12 12:34
Clifford Nelson12-Sep-12 12:34 
GeneralRe: Wpf Datagrid Pin
SledgeHammer0112-Sep-12 13:29
SledgeHammer0112-Sep-12 13:29 
QuestionWPF groupbox visibility by combobox value selected Pin
karthik bandaru11-Sep-12 20:33
karthik bandaru11-Sep-12 20:33 
AnswerRe: WPF groupbox visibility by combobox value selected Pin
Mycroft Holmes11-Sep-12 20:54
professionalMycroft Holmes11-Sep-12 20:54 
GeneralRe: WPF groupbox visibility by combobox value selected Pin
karthik bandaru11-Sep-12 21:04
karthik bandaru11-Sep-12 21:04 
GeneralRe: WPF groupbox visibility by combobox value selected Pin
Mycroft Holmes11-Sep-12 21:12
professionalMycroft Holmes11-Sep-12 21:12 
QuestionGrid Dynamic Column and Row in run time in WPF MVVM Pin
sels198711-Sep-12 15:59
sels198711-Sep-12 15:59 
AnswerRe: Grid Dynamic Column and Row in run time in WPF MVVM Pin
Clifford Nelson12-Sep-12 13:39
Clifford Nelson12-Sep-12 13:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.