Click here to Skip to main content
15,889,034 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Have used same short cut key option in menu Items and child window buttons.

Short cut key event fired in menu item when cursor focus in child window.But Child window events not fired. But i want to fired the events in child window buttons when used the short cut keys in child window.

Please give me the solution..

Thank you.
Posted
Comments
Sergey Alexandrovich Kryukov 4-Feb-12 2:16am    
There are many ways to screw up things. Could you make some (short!) code sample and post it using "Improve question" above?
--SA

1 solution

Mian Window
------------
<menu keyboardnavigation.istabstop="False" x:name="mnuApplicationMenu" dockpanel.dock="Top" background="LightSkyBlue" fontfamily="Tahoma" fontsize="12" fontweight="Medium" fontstretch="Normal" fontstyle="Normal" xmlns:x="#unknown">
               <menuitem keyboardnavigation.istabstop="False" header="_File" background="LightSkyBlue" fontfamily="Tahoma" fontsize="12" fontweight="Medium" fontstretch="Normal" fontstyle="Normal" margin="0,0,20,0">
                   <menuitem header="Logout" click="OnMenuItemLogoutClick" />
                   <menuitem header="About" click="AboutClick">
                       <menuitem.icon>
                           <image width="20" height="20" source="/e_cdsl;component/Icon/Zlogo.ico" />
                       </menuitem.icon>
                   </menuitem>
                   <menuitem header="E_xit" click="OnMenuItemExitClick" />
               </menuitem>
           </menu>


Child Window
-------------
<canvas background="#FFB9C3D5" x:name="can_authsign" xmlns:x="#unknown">
                                <textblock canvas.left="2" canvas.top="22" x:name="lbl_acctcode_authsign" text="BO ID" fontsize="13" />
                                <textbox isreadonly="True" canvas.left="160" canvas.top="20" x:name="txt_acctcode_authsign" text="{Binding acct_code, Mode=TwoWay}" width="380" />
                                <textblock canvas.left="2" canvas.top="50" x:name="lbl_NaSequenceNo_authsign" text="Na Sequence No" fontsize="13" />
                                <my1:numonlytextbox maxlength="4" isreadonly="True" canvas.left="160" canvas.top="51" x:name="txt_NaSequenceNo_authsign" text="{Binding NaSequenceNo, Mode=TwoWay}" width="380" xmlns:my1="#unknown" />
                                <textblock canvas.left="2" canvas.top="81" x:name="lbl_BoName_authsign" text="Bo Name" fontsize="13" />
                                <textbox isreadonly="True" canvas.left="160" canvas.top="83" x:name="txt_BoName_authsign" text="{Binding BoName, Mode=TwoWay}" width="380" maxlength="100" />
                                <textblock canvas.left="2" canvas.top="114" x:name="lbl_Remarks_authsign" text="Remarks" fontsize="13" />
                                <textbox isreadonly="True" canvas.left="160" canvas.top="115" x:name="txt_Remarks_authsign" text="{Binding Remarks, Mode=TwoWay}" width="380" maxlength="50" />                                
                            </canvas>
 <Button Canvas.Left="202" Canvas.Top="559" Content="_Edit" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Height="23" Name="btn_edit" Width="61" />
            <Button Canvas.Left="202" Canvas.Top="559" Content="_Save" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Height="23" Name="btn_save" Width="61" />
            <Button Canvas.Left="266" Canvas.Top="559" Content="_Cancel" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Height="23" Name="btn_cancel" Width="61" />
            <Button Canvas.Left="266" Canvas.Top="559" Content="_Delete" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Height="23" Name="btn_delete" Width="61" />
            <Button Canvas.Left="137" Canvas.Top="558" Content="_Add" FontFamily="Calibri" FontSize="13" FontWeight="Normal" Height="23" Name="btn_add" Width="61">
                
            </Button>

SQL
In this above code have used same shortcut option for About(parent), Add(child). child window shortcut was not worked.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900