How can user control inherit a user control?

I have a user control "Cell" with different methods.
I need 2 other user controls to Inherit from "Cell".
I was told to change "Cell" to a class without a xaml, I did it, and to ensure that the subclass inherits from the base class both in the cs code-behind file and in the first tag of the xaml.
how do I do it?
and, how do I know that now the user controls will have the same base class?

1. Add a new class to your project where you define the Cell class:
namespace WpfApplication22
public class Cell : System.Windows.Controls.UserControl
2. Add a new UserControl to your project and change the base class in both the XAML and the code-behind (sse the parts in bold below):
UserControl2.xaml:
<local:Cell x:Class="WpfApplication22.UserControl2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WpfApplication22"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
</Grid>
</local:Cell>
UserControl2.xaml.cs:
public partial class UserControl2 : Cell
public UserControl2() {
InitializeComponent();
3. Add another new UserControl to your project and repeat the steps in 2. above.
That should be it.
Please remember to mark helpful posts as answer to close your threads and then start a new one if you have a new question.

Similar Messages

  • How can i control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?

    Sup buddies,
    How can I control what images load on my project to save preload time and avoid loading all images, elements, divs not yet visible?
    As the project grows in size the load time increases. How does one control not loading all images ,divs,elements etc. until they're
    needed on the timeline? For example some sections are off and only become visible when recalled. My projects slowly grow in size so loading
    all images , is counter productive . My other option would be to create separate htmls but that breaks the seamless user experience .
    TY...Over N Out... 

    hello, kiwi
    quote: "Is there an easy way to burn a completed project to DVD, but keep only the (lo res, lo size) previews on my hard drive?"
    yes.
    maybe,...
    1. you might think of making DVD backups first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    or,
    2. bring in the photographs to hard drive first prior to importing the photos into Aperture. "Store Files: In their current location" once in Aperture make low rez Previews, and export finished Project.
    the low rez Previews will stay in Aperture but the high quality Versions will be exported onto DVDs and gone from the hard drive (if you delete the originals).
    another way would be to export small about 50-70 pixel wide high quality jpegs to a folder on your Desktop and import & keep these in Aperture Library as a reference. make metadata to show where the original Project DVDs are stored and DVD filing system used.
    victor

  • I plug my computer into my stereo and use the remote app on my iPhone to control it. How can I control my wires iPad with the remote app on my iphone when it is plugged into the stereo? they are different iTunes accounts.

    I plug my computer into my stereo and use the remote app on my iPhone to control it. How can I control my wires iPad with the remote app on my iphone when it is plugged into the stereo? they are different iTunes accounts.

    I think this is probably a sign that your network could be better than it is.
    Intermittent problems are often a result of interference. Interference can be caused by other networks in the neighbourhood or from household electrical items.
    You can download and install iStumbler (NetStumbler for windows users) to help you see which channels are used by neighbouring networks so that you can avoid them, but iStumbler will not see household items.
    Refer to your router manual for instructions on changing your wifi channel or adjusting your multicast rate.
    There are other types of problems that can affect networks, but this is by far the most common, hence worth mentioning first.

  • How can i control concurrent programs?

    Hi
    When ruinning GL & OPM concurrent programs, de-grades server peformance. How can i control it? I want to restrict the user not to submit or does not run during office-hours. How can it be achieved?
    Regards
    Ariz

    Ariz,
    Please mention the application release, the database version and the OS.
    Was the performance accepted before? If yes, what changes have been done recently?
    Is the issue with standard or custom concurrent programs? Also, please mention the concurrent program names (if possible).
    Do you run "Gather Schema Statistics" concurrent program on regular basis?
    To find out why those concurrent program affects the performance, enable trace as per (Note: 296559.1 - FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12) and generate the TKPROF file.
    You could schedule the concurrent program to run at certain times -- See "Oracle Applications System Administrator's Guide Documentation Set" for details.
    Oracle Applications Documentation
    http://www.oracle.com/technology/documentation/applications.html
    Regards,
    Hussein

  • BPC 10.0 - How can I control security at Environment level?

    Dear All,
    How can I control environment level security in BPC?
    i.e.
    User1 can work on only ENV01
    User2 can work on only ENV02 & ENV03
    etc...
    I believe this has to be done at BW level, right? If so, how can I do that in BW? Else, how can I achieve this?
    Thanks,
    Peri

    Hi Peri,
    yes, the admin panel is within the environment. So when you add users you add them to that specific environment. You can then log onto another environment and add a different set of users.
    Those users you wand to add need specific SAP role in the BW so you can see them in the first place.
    BR,
    Arnold

  • How can I control a mac mini connected to a benchmark dac 2 for the purpose of listening to 24/192 audio files?

    How can I control a mac mini connected by USB to a Benchmark DAC 2 for the purpose of listening to 24/192 music downloads?

    Hello,
    About the dac 1, but may apply to the dac 2 as well in some ways...
    Here are more details:
    1) The current version of iTunes (7.5) for OSX is very broken. Some older versions work properly, but 7.5 introduces truncation and DSP artifacts that can measure as high as –80dBFS. These levels are easily audible. There is no system configuration that will permit transparent playback from 44.1kHz sources with iTunes 7.5. Curiously, the only format that works properly in 7.5 is 24-bit/96kHz. This iTunes problem has nothing to do with USB communications, as the results are the same when using the built-in optical port on our PowerBooks. As a workaround, we suggest using the free VLC for Mac player. VLC works perfectly with all formats (provided OSX is set to match the sample rate of the files being played). We highly recommend the VLC player for OSX users, and strongly advise against using iTunes. We will attempt to identify which versions of iTunes work and which ones don't. But beware, iTunes updates itself without user intervention. One of our test computers "upgraded" itself to the dysfunctional iTunes 7.5.
    2) OSX still does not have the ability to follow sample-rate changes. We consider this a nuisance for most users and a show-stopper for users who want to play a mixed list of 44.1kHz and 96kHz material. An OSX sample-rate mismatch will invoke the very-poor-quality sample-rate conversion that is built into OSX. The iTunes 7.5 bug seems to be locking on this sample-rate conversion at all sample rates other than 96kHz. Until this is fixed, OSX is not the operating system of choice for audio playback.
    http://www.stereophile.com/content/benchmark-dac1-usb-da-processor-headphone-amp lifier-manufacturer-comment

  • MultipartRequest, how can I control this?

    Hi Everybody, I'm building a web page in Jsp, and in this the user can send to the server a file (a picture). The file arrive to the server thanks to 'MultipartRequest'. This is the code:
    File newDir = new File(Dir);
    newDir.mkdir();
    MultipartRequest multi = null;
    try
    multi = new MultipartRequest(request, Dir, 90000);
    catch (IOException e){ }
    My question is, how can I control, that the file is not a virus or its lenght is too much?
    Thanks for all

    Hi, I believe you are using the com.oreilly.servlet package.
    If so you probably also have the com.oreilly.servlet.multipart package too.
    So you could try to use the MultipartParser class which I believe it's better to handle MultipartRequests.
    The constructor is MultipartParser(request,size), and then you have a readNextPart() method. Then you can check if this part is a FilePart.
    Once you have a FilePart, you can get its fileName (by getFileName()) and would be easy to control if the file's type is what you wanted (e.g. gif,jpeg,...).
    Regarding the file size I haven't found a direct method but I believe you should analyse this package and with some workaround it should be done.
    Hope this helps, regards.

  • How can I control selection on a PDF

    I have Acrobat Pro 9 Pro build 9.4.6 and am constantly exporting documents from indesign to .pdf, and also building docs in the 'combine' feature from mixed pages. 
    While everything seems to go reasonably well, I have a few problems that are due either to my ignorance, or bugs.
    1.  The biggie; How can I control what I select, for the purpose of copying, moving and deleting?   When I drag the touch-up object tool over my selection, it selects what it wants to most of the time; sometimes it selects (i.e., puts a light blue box around) the entire page, instead of my selection (no pages are scanned).  There are very few instances when I get exactly what I want; there are usually a few lines above or below, no matter how careful I am in my selection.  The funny thing is that this is not a constant; sometimes, the tool works perfectly!  and I have my heart in my mouth every time I really need it to work, hoping that it will not force me to go back to Indesign to make minor corrections.   Perhaps my problems are connected to options I select when exporting my indds, but I've tried checking, clearing, and selecting various combinations and nothing seems to work.
    Sometimes, the text selection tool is strange; a wide blue swath develops over the selected text, even though it is still usually possible to  edit the text in this condition.  And BTW, is there anything to do about the fact that some text can't be edited at all because a suitable font replacement can't be found?  Can't a font be added somehow that will take care of this?
    2. Headers and Footers; fairly effortless, but if the footer contains two rows and I want them centered, the second row looks centered in the preview but not in the doc.  I have to go back to the footer dialog and guesstimate how many spaces to place before the second row to get it to look centered.  Also, is there any way to place a logo in a header?  That would be one of my requests for the next version of Acrobat, if not.
    3.Hyperlinks; they don't always work,even though I check Hyperlinks in the Export settings.  Sometimes yes, sometimes no.
    4.  Typwriter toolbar; it also seems to offer font and size changes whenever it feels like it, and I've tried all different orders of typing, selecting, etc.

    It's me again, sorry!  I wanted to save what I'd written, and my message popped up to the board.
    Thank you for any advice anyone has!
    PS  My indd and acrobat are the same version, as they came in the same package (CS4).  Windows XP sp3.
    Oh, one more thing I just remembered, as long as I'm complaining; sometimes if I place an object (the logo) and copy it to another page, it disappears on the original page, as if I've cut it.  Any fix for that?  (strange how I can edit tmy 'reply' but not my original post...well, at least I found where to ask a question fairly quickly!)

  • How can I control the zoom on my mac mouse?

    How can I control the zoom function on my mouse? In the middle of working on things my hand will rub the mouse by accident and all of a sudden the context within the screen is large. I have no idea of how to work this feature on my mouse and most times to get it to return to normal, I have to escape out of the work I am performing.

    If you are pressing the "Control" button on the Mac keyboard, scrolling up will zoom in and scrolling down will zoom out. You can disable this if it annoys you through System Preferences > Universal Access. If you are using Mountain Lion, it would be System Preferences > Accessibility.
    Uncheck the in the "Seeing" or "Zoom" section that says "Use scroll gesture with modifier keys to zoom".  It may be slightly different if you have an older OS X version. I have Mountain Lion and am going off of memory on the older versions.

  • How can I control a button from one swf file to another swf file?

    Hi,
    I have a main.swf file. From that file I am accessing the external.swf file which is an external file.
    Now, how can I write code on my main.swf file for the button which is on my external.swf file?
    Activities.MainPanel.close_btn.addEventListener(MouseEvent.CLICK, btnClickClose);
    Activities.MainPanel.close_btn (This buttons is actually on external.swf file, but I want to write code on main.swf file to execute it on external.swf) how can I control one swf button on other swf file?
    Thanks.

    Here's some example code that you should be able to adapt to your needs.
    // create a new loader object instance...
    var loader:Loader = new Loader();
    // make the download request...
    var request:URLRequest = new URLRequest("external.swf");
    // add a complete event listener to the loader
    loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
    // start the actual loading process...
    loader.load(request);
    // create a new empty movieClip instance, you will put the loaded movie into this movieClip once its loaded
    var externalMovie:MovieClip;
    // this function is called when the download has finished and the file is ready to use...
    function completeHandler(event:Event):void {
       // set the contents of the loaded movie to the new empty movieClip...
               externalMovie = MovieClip(event.target.content);
       // add this new movie to the display list...
       addChild(externalMovie);
    Now you can refer to the loaded movie with the instance name "externalMovie". So if, for instance, you want to address a button in the loaded movie, you could write something like this on the main timeline:
    externalMovie.addEventListener(MouseEvent.CLICK, btnClickClose);
    function btnClickClose(event:MouseEvent):void {

  • How can I control how many times an individual photo is shown?

    How can I control the frequency of each photo on apple tv?

    Welcome to the Apple Community.
    Photos in slideshows will only be showed once until the slideshow repeats. If you want it to show more than once you will need to duplicate it.
    Photos in screensavers show randomly.

  • How can I control an iPad from a touch screen which is mirroring the iPad screen

    How can I control an iPad from a touch screen which is mirroring the iPad screen.
    This is a very important application for disability students who wish to use iPad apps but do not have sufficient fine motor skills to use the small screen of an iPad but could use a large format display touch screen.
    There must be a way.?????????? Help!!
    Peter Niass
    [email protected]

    Have a look here
    http://www.macstories.net/iphone/the-external-touchscreen-that-can-control-an-ip hone/

  • How can I control my fan speed?

    How can I control my fan speed on my macbook pro? I use SMC for gaming and streaming video from the internet when using my Mac OS, but I partitioned my drive and installed Windows 8 in order to play a different game (not a huge game) and the computer heats up dramatically when playing on Windows through Boot Camp to the point that it freezes every time (it never does this when playing a mac game or streaming on the normal partition Mac OS).
    Any suggestions or programs to control fan speed of the mac from windows?

    Get a cooling pad.  That will much better than trying to constantly adjust fan speeds.
    Ciao.

  • How can i control my mini mac with my ipad on diferent wifi networks?

    How can i control my mini mac with my ipad on diferent wifi networks?

    Go to my pc, splashtop, team viewer or any of the several remote desktop apps in the store.

  • How can I control my my mac mini with my macbook air (no wifi)?

    How can I control my my mac mini with my macbook air (no wifi)? Also...what is the best method (less lag) for screen sharing? 
    I own a mac mini Quad Server 2.0 i7 and I use it for audio production.  It's great but I need to travel with it. I was hoping some form of screen sharing could be useful using the macbook air to control the mac mini.  Therefore, I'd be using the stronger processor of the mac mini but would still be using the keyboard and trackpad from the air. 
    My two problems: 
    1.  I can't depend on wifi to make this happen. Wifi is not always available when travleing.  What would be the best way to configure a LAN connection?
    2.  The less lag the better for screen sharing.  Which apps are fastest?
    Thanks in advance.

    Both of your devices have WiFi built in. Here is Apple Support's solution:
    http://support.apple.com/kb/TA25616?viewlocale=en_US&locale=en_US

  • How Can I Control Format & Color Of Text Links?

    iWeb appears to colorize and/or box or underline link text according to its own "uncontrollable" set of criteria.
    How can I control the color of a text hyperlink and turn automatic link underlining OFF?

    you CANNOT do that in iWeb. there are the following ways around iWeb which solve it:
    http://www.rowan-cottage.co.uk/Site/CSSiniWeb.html
    im bringing up a video tutorial soon, so check my site in the future!
    max

Maybe you are looking for

  • Photoshop CS4 (Vista x64) Type Tool Crash

    Hey guys, I recently installed CS4 and am loving it a lot. Although, I have found a very fatal bug that I need to correct. I'm running Photoshop Extended on Windows Vista Ultimate SP1 x64. I can start Adobe just fine, make documents, and such. The cr

  • Facebook crashing after Ios7 update

    Just updated to new ios this morning.  My Facebook app just started crashing, up to about ten minutes ago it had been working normally.  Any ideas?

  • Will Air Display work on my Mac 10.5.8?

    So i just downloaded Air Display in hopes of making my desktop Mac a second monitor for my Macbook Pro. The desktop is version 10.5.8 and is having troubles downloading the software. I may be doing the installation steps wrong.. I have no idea. Any s

  • XI Receiver Mail Adapter converts linefeeds from CRLF to LF

    Did you ever find a solution for this - I have the exact same problem now.

  • Trouble Logging into Document Cloud

    Adobe Reader Mobile does not allow me access to Cloud using my Adobe ID and Password. Error states Adobe ID/Password incorrect.