Is there any how to make control without xaml ?

Is there any how to make control without
Generic.xaml ?
When we use templete control , Normally we made a custom control using  geniri.xaml  to make make up control templet.
without Generic.xaml  is it possiable to make up   control templet  that contained many component like a button stackpannel.
this is my sample code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.UI;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Documents;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
namespace derrick_test
public class DerrickPanel : Control
private StackPanel parentPanel;
private TextBlock testBlock;
public DerrickPanel()
this.DefaultStyleKey = typeof(DerrickPanel);
parentPanel = new StackPanel();
testBlock = new TextBlock();
parentPanel.Orientation = Orientation.Vertical;
parentPanel.Background = new SolidColorBrush(Colors.Red);
testBlock.Foreground = new SolidColorBrush(Colors.Aqua);
testBlock.Text = " hello World ";
parentPanel.Children.Add(testBlock);
  Best Regrads Derrick.

Here's one solution that I found:
public sealed partial class MainPage : Page
public MainPage()
this.InitializeComponent();
protected override void OnNavigatedTo(NavigationEventArgs e)
DerrickPanel D = new DerrickPanel();
MyGrid.Children.Add(D);
public class DerrickPanel : Control
private StackPanel parentPanel;
private TextBlock testBlock;
public DerrickPanel()
this.DefaultStyleKey = typeof(DerrickPanel);
this.Template = DerrickPanel.CreateTemplate();
private static ControlTemplate CreateTemplate()
string xaml = "<ControlTemplate xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\">";
xaml += "<StackPanel Orientation=\"Vertical\" Background=\"Red\">";
xaml += "<TextBlock Foreground=\"Aqua\">Hello World</TextBlock>";
xaml += "</StackPanel>";
xaml += "</ControlTemplate>";
var сt = (ControlTemplate)XamlReader.Load(xaml);
return сt;
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces.

Similar Messages

  • Is there any way to make windows "sticky" in mission control?

    If I have several applications open, then invoke mission control, then click on a window to select it, the windows are in a different position the next time I invoke mission control.  This is like trying to hit a moving target, or as I sometimes refer to it,  "musical windows".  I've tried checking and uncheckng the mission control options in system preferences, but the windows still move all over.  Is there any way to make windows "sticky"?  What I would prefer ideally is that each group of windows remains in the same location, then new ones are added after.  I find it frustrating to have to scan mission control and locate the window I want, which is always being moved.
    -Thanks

    Go to Intel Download Center and select the 3000/4000 driver.
    you may need to uninstall the current driver if it won't install on its own

  • I got my New iPad in the mail yesterday. I imported my photos and videos to make a short movie. The photos had lost all their original quality. Is there any way to import photos without losing quality?

    I got my New iPad in the mail yesterday. I imported my photos and videos to make a short movie. The photos had lost all their original quality. Is there any way to import photos without losing quality?

    If you mean "optimizing for iPad," no.

  • My wifi button is frezon and I tried turning my phone off for a period of time and reset my phone but the button is still frezon it want slide over to turn on my wifi. Is there any other way to fix without going to apple to get it fixed?

    My wifi button is frezon and I tried turning my phone off for a period of time and reset my phone but the button is still frezon it want slide over to turn on my wifi. Is there any other way to fix without going to apple to get it fixed?

    Hey Posada143, You can still try the rice thing, but do not expect much, as roaminggnome has stated. The rice only works if you do it ASAP and leave the iPod off-- do not attempt use, turn on or charge until it is completely dried out. This is probably academic at this point but remember this for the next time: The drying can take 10 days. You put the uncooked rice and iPod in a sealed bag, change the rice every couple of days. This creates a low humidity environment and draws the moisture out of the iPod, but it takes time. Turn your iPod on to earlier, and you run the risk of shorting out, damaging the components inside. Even if done correctly it can spotty. If you do get the iPod to work (and this may require Resetting, Restoring or attempting to place it in DFU recover mode) the first thing you do is make backups, because you never know how long it will continue to work. As for your pictures, if you can't get your iPod to work, you can try data retrieval companies, however; there is no guaranty it will work and it tends to be very expensive. In the future get in the habit of as making backups, because you just don't know. And invest in and use a water tight case. Hope this helps, Good luck. Cheers.

  • Is there any way to make work item invisible in the SAP inbox?

    Is there any way to make work item invisible in the SAP inbox?
    If yes , How?
    How can we delete a work item without using SAPLSINWP program?Is it possible???

    Thanks suresh, But I was a looking for a solution where as soon as the work item is created should be made invisible in the SAP inbox, is there any way for this or any other alternative?

  • I use firefox - Is there any way to make it so my internet browser only remembers the MAIN site? -- EG: Only Youtube.co.uk instead of Youtube.co.uk/VIDEO ect

    I use firefox - Is there any way to make it so my internet browser only remembers the MAIN site? -- EG: Only Youtube.co.uk instead of Youtube.co.uk/VIDEO ect.ect. WHISPER PLEASE

    Is this to reduce the clutter of suggestions on the address bar, or for some other reason?
    You can change the address bar drop-down so it only suggest bookmarked sites instead of everything in your history. This article describes how to make that change: [[Awesome Bar - Find your bookmarks, history and tabs when you type in the address bar]] (see the section "How can I control what results the location bar shows me?").
    Am I on the right track?
    (I'm avoiding the really hard question of how to selectively cull your history. I can't think of a way to do that.)

  • In contacts there is the possibility to add a new event, as the birthdays, but they do not appear in iCal. Is there any way to make that possible? It is normal to have a person with his birthday, anniversary and others key dates you want to link to him.

    In contacts there is the possibility to add a new event, as the birthdays, but they do not appear in iCal. Is there any way to make that possible? It is normal to have a person with his birthday, anniversary and others key dates you want to link to such person, but the only one shows up is the birthday. How to be able to show all those dates linked to people in the agenda in the iCal?
    Thanks

    Hi,
    I sugggest you try my application, Dates to iCal. It is shareware with a 2 week trial period.
    Dates to iCal 2 is a replacement for Apple's birthday calendar for iCal. It has a range of features to allow the user to choose what, and what not, to sync to iCal from Address Book.
    As well as automatically syncing birthday dates from Address Book, Dates to iCal 2 can sync anniversary and custom dates. It can set up to five alarms for each date in iCal and can also set different alarms for birthdays and anniversaries. It allows the option of only syncing from one Address Book group. This application also allows for the titles of the events sent to iCal to be modified to the user's preference.
    Best wishes
    John M
    As I sell software on my site and ask for donations, the Apple Support Communities Use Agreement requires that I state that I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Is there any way to make Mail open next message?

    Is there any way to make Mail open the next message on the inbox automatically after deleting, forwarding o saving a message?
    I mean, is there any way to, after reading a message, going to the next or previous message without double clicking the main inbox window?
    I used (on windows) to read mail on outlook, or even on entourage for mac, and after I read a message, even if I deleted it, forward it, replied it, or even saving it on a folder, automatically the program (outlook, entourage, hotmail, etc) opened the next message on the inbox, but I am not able to find any way to make Mail do that.
    Is there a way to it? Or should I provide suggestions to Apple?
    By the way, no meant to prefer microsoft for this, I just think this is a cool feature for reading several messages one after another without going back to the main inbox page and double clicking the message to read...
    Thanks for any help

    Down-arrow, Return. Return opens the selected message. I read through hundreds of messages without ever touching the mouse. Once you get used to the keystrokes, Mail is extremely efficient.

  • My family shares one apple id. Is there any way to make an apple id for each member of my family and have it all connected to the same credit card and have the same previous downloads open to download by signing in to each members personal apple id?

    My family shares one apple id. Is there any way to make an apple id for each member of my family and have it all connected to the same credit card and have the same previous downloads open to download by signing in to each members personal apple id?

    Hi cindy,
    If you all have individual Apple IDs, then you would be able to dowload music from a shared iTunes library on a computer, but you would not be able to sign on each individual ID on an iOS device in order to download music purchased under the original Apple ID without a 90-day waiting period between sign-ons.
    Here's what I mean:
    If you were to sign on a new Apple ID on, say, an iPhone, and then were to purchase and download some music from iTunes, then you would have to wait 90 days before you could sign on the old Apple ID to that iPhone in order to download previously purchased material (and vice versa).
    However, if all of the music purchased by that origjnal Apple ID is in an iTunes library on a shared computer, then you can hook up the device and selectively sync any music in that library to the device. You can also sign on any of the Apple IDs to that shared iTunes library and purchase music to be added to the library.
    You would need to authorize the computer for each of the new Apple IDs.
    Each of the Apple IDs would also be able to download that music purchased either by syncing to the iTunes library on the computer or by downloading it OTA on the device.
    So, each Apple ID can download music, movies, etc. purchased with that Apple ID OTA to the device. Also each Apple ID can sync any music, movies, etc. that are in the iTunes library on the computer regardless of who purchased them.
    The only other thing you would need to remember is that if an App needed to be updated, then the original Apple ID that was used to purchase that App would come up, and the password that goes with that Apple ID would be required to do the update.
    Hope that helps,
    GB

  • Being deaf, I rely on the vibrate mode to alert me to incoming messages. I recently obtained an iPhone 4 and I find its vibrate mode wimpy, causing me to miss calls. Is there any way to make it more robust?

    Being deaf, I rely on the vibrate mode to alert me to incoming messages or reminders. I haven't had problems with my previous PDAs such as Blackberry and Motorola, but since I obtained an iPhone 4, I`ve discovered that its vibrate mode is more of a whimper than anything else. I`ve missed many calls as its vibes are indiscernible when it`s in the holster on my belt. Is there any way to make the vibes more robust? I`ve amped up the ring volume control to no avail.

    No, there is no adjustment for the vibrating mode.

  • Preview: How to make "Rotate without modifying contents" the default?

    In Snow Leopard, the Preview application finally learned to modify the orientation of JPEG images by simply adjusting the orientation tag in the EXIF headers and (unlike previous versions) without touching the rest of the data at all. To use this feature, you have to rotate an image to the correct orientation, select "Save As" and then check the "Rotate without modifying contents" option before you click on the Save button.
    Unfortunately this option does not seem to stick (I have to check the box again every time) and it is not used when you select "Save" or "Save All" instead of "Save As". So if you want to browse and rotate a large number of photos from a camera without an orientation sensor, you have to repeat the procedure above for every single shot taken in portrait orientation, or otherwise Preview will re-encode the rotated images at an arbitrarily chosen compression ratio and thus degrade their image quality.
    Is there any way to make Preview
    a) keep the option selected and, more importantly,
    b) use it by default when selecting "Save" and "Save All" as well?

    tartan66 wrote:
    B.  Associate the Rotate Canvas dialog box with a keyboard shortcut so even if it won't stay open I won't have to fish thru the Image menu to get it each time.
    I'm not really sure if this is documented but you can navigate the entire menu using the keyboard. (I only have up to PSE 3 so I'm assuming it hasn't been stripped out of Elements yet.)
    Anyway...
    On PC, press the alt key + I (for Image); the menu will pop up (notice there are underscores under one letter of each command--these only appear if you use the initial shortcut). The E is underlined in Rotate. Press E. The Rotate menu pops up. The C is underlined in Custom. Press C...rotation dialog will pop up.
    So Alt + I, then E, then C.
    You can also input the number...if you desire changing rotation direction left to right hit TAB key (jumps to next field); then L or R which are underscored for left and right. Hit ENTER to accept or ESC to dismiss.
    BTW, This menu navigation works for all the menus. You'll note there are two menus headed by F. The second one Filter will be alt + t.
    Why is filter T? F was taken by file, I was taken by image, and L was taken by layers. The Organizer can also be navigated in this manner.
    Edit: Some menu items will not have underscores but can still be done this way. They are easy enough to guess since you know they use letters in the word.  Example:  Unsharp mask. Press alt + T (to open filter menu); then S (for Sharpen); then right arrow key (opens the sharpen submenu); then U (for Unsharp Mask).
    If on a mac, I believe you would substitute the opt key for the alt key.

  • Is there any plan to make Power View (charts and report) more customizable?

    Hi,
    I just was playing with Power tool chain in Excel and office 365, this a nice product well down.
    I have a question about the whole idea, is there any plan to make charts more customizable for example user will be able to show the current filter value in the chart or view title (is good while  drill downing) or some simple stuff like showing the
    pie value not in tool bar but indicators in the chart itself  or changing the type of chart while drilling down (start with a column chart then drill to a pie chart) or...
    Or more generally some programming framework to customize Power View , for example some programming framework (writing add-in for an add-in :-))?!!
    thx

    Hi,
    -Yes simply the option to add the drill filters' value on the chart title (not just in the filter panel).
    - Yes, exactly. Showing labels On Pie Charts,
    Also about changing chart's type, I meant somehow be able to change the chart while drill downing (when you go down you can preset chart type for next level) 
     - The ability of connecting views to each-other (something like linking views and sending filters or other expressions/parameters from one view to the second view
    based on users actions like drill downing)
    - Also more generally about API/framework (and quite hard to achieve maybe),  the possibility to add some dynamic functionality like changing the color, show some dialog/ change the view navigation based
    on the user interactions or add custom themes (maybe CSS) (UI
    customization ) , the ability to call other data sources and change  the report dynamically
    Generally be able to add custom codes in the javascript/Html5 result report ( some )
    Also ability to add custom controls
    in designer part (and adding its client side behavior too  ) something like Custom Report Item (CRI) in Reporting Service.
    Br,

  • Hi. My mavericks is crashed and when i on my mac always showstha disk utility window. I do everything like repair and all but not fix this problem. I have no back up of my files. Is there any way to reinstall mavericks without erase my old data ?

    Hi. My mavericks is crashed and when i on my mac always showstha disk utility window. I do everything like repair and all but not fix this problem. I have no back up of my files. Is there any way to reinstall mavericks without erase my old data ?

    To back up your data, either use Target Disk Mode and a cable from another Mac (which mounts your problem Mac as an external disk of the other Mac) and Disk Utility on that other Mac, or — and this is all assuming you either have a slow Internet connection and don't want to use Internet Recovery, or if you have an older Mac that doesn't support Internet Recovery — you can create a bootable USB key disk on another Mac and then boot your problematic Mac from that keydisk, then use Disk Utility from the installer to make a backup to another (external) (scratch) disk.  You can also use that keydisk to reinstall OS X, to repair or to reinstall OS X.

  • Is there any way to make the sent folder in mail list emails "to" instead of  "from"

    Is there any way to make the sent folder in mail list emails in the "to" order instead of  "from".

    Sure open Sent folder.
    Just above first message is an icon titled Sort By Date followed by a downward pointing arrow.
    Click on the arrow and select "To" from the list.
    Allan

  • Iphone 4S newly updated to iOS8, keeps popping up window notifying me of things I turned off (cell usage, location, etc) to preserve battery life.  Is there any way to make them stop telling me every time I use the affected apps?

    I have finally taken the step of updating my iPhone 4S to iOS8 after learning the hard way last update to wait for the bugs to be worked out.  I was horrified to find that the battery was being sucked dry in no time at all.  After finding a great article posted elsewhere on the apple forums, I went through and turned off all unnecessary options involving the use of cell data, location services and background refreshing.  My battery life has thankfully returned to what it was before the update.  
    HOWEVER, now, every time I open an app for which I turned these things off, the window informing me of that pops up.   I am getting really irritated by this as I made all of these decisions deliberately and am well aware that I may need to go back and change them in order to activate certain capabilities when I want to use them.  I had done the same thing with the last iOS, but there were far fewer that needed to be turned off and the battery life seemed to be less affected by those that I left on so it was not the annoyance it has become now.
    Is there any way to make the phone stop presenting me with these idiot messages?   TIA

    Sorry no, there isn't a way to turn off those reminders.
    You can send Apple a feedback here  http://www.apple.com/feedback/

Maybe you are looking for

  • I have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? please help :-(

    i have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? I do not know the log in details and no longer have that icloud email address !! please help :-(

  • Pie chart label

    I have a pie chart and the region is limited in width. Some of the labels are a little long (even if they are abreviations) so that when they are at the center left or right of the pie chart, the labels are not enterily displayed. I was wondering if

  • Read directories of an application server

    Hi i asked some question about this topic but i want to know at sure There is wat to Read directories of an application server? thanks

  • Converting CASE st. to decode

    Hi, I'm using Oracle 8.0.5, apparently it does not support the CASE function. SOmeone let me know if this is incorrect, but I can't get it to work. My question is I'm trying to write a fairly simple decode or CASE statement that says, SELECT e.poid_t

  • Cannot run tmux as non-root user.

    I'm not certain if this is the correct section for this. I have a cloud server that I recently created that doesn't have a swap partition.  I migrated the home directory for this user from another server to this new server.  The appropriate permissio