Click here to Skip to main content
15,434,219 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to close FileStream without causing an error in PdfViewer Pin
Richard Deeming8-Aug-22 0:08
mveRichard Deeming8-Aug-22 0:08 
QuestionFacing problem when calling store procedure from c# code Pin
Mou_kol2-Aug-22 7:52
MemberMou_kol2-Aug-22 7:52 
AnswerRe: Facing problem when calling store procedure from c# code Pin
Richard Deeming2-Aug-22 21:21
mveRichard Deeming2-Aug-22 21:21 
GeneralRe: Facing problem when calling store procedure from c# code Pin
Mou_kol3-Aug-22 3:27
MemberMou_kol3-Aug-22 3:27 
GeneralRe: Facing problem when calling store procedure from c# code Pin
Victor Nijegorodov3-Aug-22 5:33
MemberVictor Nijegorodov3-Aug-22 5:33 
QuestionRe: Facing problem when calling store procedure from c# code Pin
thatraja2-Aug-22 21:36
professionalthatraja2-Aug-22 21:36 
AnswerRe: Facing problem when calling store procedure from c# code Pin
Gerry Schmitz3-Aug-22 5:58
mveGerry Schmitz3-Aug-22 5:58 
QuestionHow to dispose Interaction.Behaviors in WPF Pin
Code4Ever2-Aug-22 5:45
MemberCode4Ever2-Aug-22 5:45 
I'm using WPF MVVM in my project. I have used Interaction.Behaviors in the root section of one of my views:

C#
<interactivity:Interaction.Behaviors>
    <local:SfDataPagerBehavior_OnDemand />
    <local:SfDataPagerBehavior_File />
</interactivity:Interaction.Behaviors>


One of the Behavior classes is:

public class SfDataPagerBehavior_File : Behavior<EquipmentIdentitySetting>, IRecipient<FileFilterText>, IRecipient<UpdateDatagrid_Pdf>
{
    public SfDataPagerBehavior_File()
        {
            WeakReferenceMessenger.Default.Register<FileFilterText>(this);
            WeakReferenceMessenger.Default.Register<UpdateDatagrid_Pdf>(this);
        }
    protected override void OnAttached()
    {
        base.OnAttached();
        .
        .
        AssociatedObject.dataPager_file.OnDemandLoading += OnOnDemandLoading;
        //Some codes
        .
        .
    }
    protected override void OnDetaching()
    {
        base.OnDetaching();
        AssociatedObject.dataPager_file.OnDemandLoading -= OnOnDemandLoading;
    }
    public async void Receive(FileFilterText message)
    {
        //Some codes
    }
    public async void Receive(UpdateDatagrid_Pdf message)
    {
        //Some codes
    }
}


I want to dispose all Interaction.Behaviors in the view by pressing a button.

How can I do this?
AnswerRe: How to dispose Interaction.Behaviors in WPF Pin
Gerry Schmitz2-Aug-22 6:21
mveGerry Schmitz2-Aug-22 6:21 
QuestionHow to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 20:38
MemberCode4Ever31-Jul-22 20:38 
AnswerRe: How to set null value to a FOREIGN KEY using EF Core Pin
Richard MacCutchan31-Jul-22 21:37
mveRichard MacCutchan31-Jul-22 21:37 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 21:49
MemberCode4Ever31-Jul-22 21:49 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Richard MacCutchan31-Jul-22 22:06
mveRichard MacCutchan31-Jul-22 22:06 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Code4Ever31-Jul-22 22:17
MemberCode4Ever31-Jul-22 22:17 
GeneralRe: How to set null value to a FOREIGN KEY using EF Core Pin
Dave Kreskowiak1-Aug-22 4:23
mveDave Kreskowiak1-Aug-22 4:23 
AnswerRe: How to set null value to a FOREIGN KEY using EF Core Pin
Richard Deeming1-Aug-22 0:25
mveRichard Deeming1-Aug-22 0:25 
AnswerRe: How to set null value to a FOREIGN KEY using EF Core Pin
Gerry Schmitz1-Aug-22 7:02
mveGerry Schmitz1-Aug-22 7:02 
QuestionMocking HttpContext Pin
SreeRama Govind31-Jul-22 17:26
MemberSreeRama Govind31-Jul-22 17:26 
AnswerRe: Mocking HttpContext Pin
Pete O'Hanlon1-Aug-22 23:26
mvaPete O'Hanlon1-Aug-22 23:26 
GeneralRe: Mocking HttpContext Pin
SreeRama Govind3-Aug-22 8:59
MemberSreeRama Govind3-Aug-22 8:59 
QuestionControlDesigner issue Pin
mo149230-Jul-22 0:51
Membermo149230-Jul-22 0:51 
AnswerRe: ControlDesigner issue Pin
Gerry Schmitz30-Jul-22 5:04
mveGerry Schmitz30-Jul-22 5:04 
GeneralRe: ControlDesigner issue Pin
mo149230-Jul-22 7:35
Membermo149230-Jul-22 7:35 
GeneralRe: ControlDesigner issue Pin
Gerry Schmitz30-Jul-22 14:49
mveGerry Schmitz30-Jul-22 14:49 
GeneralRe: ControlDesigner issue Pin
mo149231-Jul-22 6:43
Membermo149231-Jul-22 6:43 

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.