StackOverflowException was unhandled when I set the datacontext of xaml to the partial class?

<Page x:Class="GraphToTable.Page1"
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:src="clr-namespace:GraphToTable"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="1200" Width="auto" Height="auto"
Title="Page1">
<Page.DataContext>
<src:Page1/>
</Page.DataContext>
 Does this means that I cannot set the datacontext from xaml to same class that it's referring to? 

Hi Boppy,
It can be set to DeatContext at only design time using d:DataContext , and can be set at run time using RelativeSource.
<Page x:Class="GraphToTable.Page1"
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:src="clr-namespace:GraphToTable"
mc:Ignorable="d"
d:DesignHeight="600" d:DesignWidth="1200" Width="auto" Height="auto" Title="Page1"
d:DataContext="{d:DesignInstance Type=src:Page1}"
DataContext="{Binding RelativeSource={RelativeSource Mode=Self}}">
<Grid>
<TextBlock Text="{Binding Path=ActualHeight}" />
</Grid>
</Page>
個別に明示されていない限りgekkaがフォーラムに投稿したコードにはフォーラム使用条件に基づき「MICROSOFT LIMITED PUBLIC LICENSE」が適用されます。(かなり自由に使ってOK!)

Similar Messages

  • I am using iCal on my iMac, iPad and iPhone using iCloud and when I set the alert for 1 day before and the second alert to 1 hr before, then save the alerts switched.  Was is this happening?

    I am using iCal on my iMac, iPad and iPhone and when I set the alert for 1 day before and the second alert to 1 hr before, then save the alerts switched.  Was is this happening?

    http://support.apple.com/kb/he57?viewlocale=de_de
    India
    (91) 1800 4250 744
    www.apple.com/in/support/
    hope it helps

  • How do I create a DVD with no theme, i.e., it plays what was recorded when inserted in the player?

    How do I create a DVD with no theme, i.e., it plays what was recorded when inserted in the player?  Nothing extra, just the recorded content.

    Hi
    No Menu on DVD
    from. Mishmunken
    How to create a DVD in iDVD6 without menu (there are several options)
    1. Easy. Drop your iMovie in the auto-play box in iDVD's Map View, then set your auto-play item (your movie) to loop continuously.
    Disadvantage. The DVD plays until you hit stop on the remote
    2. Still easy. If you don't want your (auto-play) movie to loop, you can create a black theme by replacing the background of a static theme with a black background and no content in the drop-zone (text needs to be black as well).
    Disadvantage. The menu is still there and will play after the movie. You don't see it, but your disc keeps spinning in the player.
    3. Still quite easy but takes more time. Export the iMovie to DV tape, and then re-import using One-Step DVD.
    Disadvantage. One-Step DVD creation has been known to be not 100% reliable.
    4. (My preferred method) Easy enough but needs 3rd party software. Toast lets you burn your iMovie to DVD without menu - just drag the iMovie project to the Toast Window and click burn.
    Disadvantage. you'll need to spend some extra $$ for the software. In Toast, you just drop the iMovie project on the Window and click Burn.
    5. The "hard way". Post-production with myDVDedit (free-ware)
    Tools necessary. myDVDedit ( www.mydvdedit.com )
    • create a disc image of your iDVD project, then double-click to mount it.
    • Extract the VIDEO_TS and AUDIO_TS folders to a location of your choice. select the VIDEO_TS folder and hit Cmd + I to open the Inspector window
    • Set permissions to "read & write" and include all enclosed items; Ignore the warning.
    • Open the VIDEO_TS folder with myDVDedit. You'll find all items enclosed in your DVD in the left hand panel.
    • Select the menu (usually named VTS Menu) and delete it
    • Choose from the menu File > Test with DVD Player to see if your DVD behaves as planned. If it works save and close myDVDedit.
    • Before burning the folders to Video DVD, set permissions back to "read only", then create a disc image burnable with Disc Utility from a VIDEO_TS folder using Laine D. Lee's DVD Imager.
    //lonestar.utsa.edu/llee/applescript/dvdimager.html
    hope this helps!
    From LynnLU USA
    www.mediasoftmac.com/dvd-creator-articles/convert-mov-video-to-dvd-on-mac.html#1 29
    Yours Bengt W

  • Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser ..

    Firefox no longer loads home page or deletes cookies. I have repeatedly checked both settings and they are correct. It always goes to the last page I was on when I closed the browser .

    Go to '''TOOLS''' then''' OPTIONS''' then in '''GENERAL''' panel in '''STARTUP '''session choose '''Show my home page''', then click '''OK''' to save it, exit firefox and restart-it.
    see for more info: [https://support.mozilla.org/en-US/kb/Options%20window%20-%20General%20panel Options window - General panel]
    thank you
    Please mark "Solved" the answer that really solve the problem, to help others with a similar problem.

  • When install iTunes 11.1.4   It says Apple Mobile Device Service service will not start.  It was started when I began the installation.  Is this an Apple software bug?

    When install iTunes 11.1.4   It says Apple Mobile Device Service service will not start.  It was started when I began the installation.  Is this an Apple software bug?

    I have this issue. It isn't the MSVCR80 issue. No matter what I do nothing will let me even INSTALL Apple Moblie Device. Further details are in my thread:
    https://discussions.apple.com/thread/5831093

  • My iPhone has a protective cover on it and I carry it in my pocket a lot.  Quite often when I take it out of my pocket the silent/ring switch is off and I am sure it was on when I put the phone in my pocket.  How can this be happening?

    My iPhone has a protective cover on it and I carry it in my pocket a lot.  Quite often when I take it out of my pocket the silent/ring switch is off and I am sure it was on when I put the phone in my pocket.  How can this be happening?

    Protective cover as in screen protector?  This would have nothing to do with the silent switch.
    If you're referring to an actual case though... take the case off and see if the problem continues.
    It may be as simple as the silent switch being lose, which will require a device replacement to resolve.

  • IPhone 4 - my phone doesn't "ring"...  Speaker plays, it works on vibrate, and when you set the ringer, it will play.  Just not when an incoming call comes in.  Any thoughts?

    iPhone 4 - my phone doesn't "ring".  Speaker plays, it works on vibrate, and when you set the ringer, it will play.  Just not when an incoming call comes in.  Any thoughts?

    Check the position of the mute switch. On the side, just above the volume keys.

  • How can I get the cd that was provided when I bought the book dummies for bass guitar to play on my ipad thanks

    How can I get the cd that was provided when I bought the book bass guitar for dummies from iTunes to play on my ipad.probably someone should provide me with a file or download?thanks

    You need to import the CD into iTunes on your computer and then sync the tracks to your iPad.
    Regards.

  • I was wondering when I set up my collections, groups, and metadata in Abode Bridge CS6 if there was any way to transfer that information to Abode Bridge CC?

    I was wondering when I set up my collections, groups, and metadata in Abode Bridge CS6 if there was any way to transfer that information to Abode Bridge CC?

    Funds cannot be transferred from one Apple ID account to another.
    Try here > Rescue email address and how to reset Apple ID security questions
    If that doesn't help, contact Apple for assistance with your security questions > Contacting Apple for support and service

  • HT2476 apps preview was hang when scroll thru the pdf documents

    I have upgraded my mbpro to mountain lion but application "preview" was hang when scroll thru the pdf documents. can somebody help me with solutions?

    From the Safari menu bar, select
              Help ▹ Installed Plug-ins
    Besides the following, what plugins are listed?
              iPhotoPhotocast
              Java
              QuickTime
              Shockwave Flash
              WebKit built-in PDF (absent in OS X 10.9 and later)

  • Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.

    Hi All,
    I am trying to add a new task to a Tasks list called CATasks. The list was created via Visual Studio “Add > New Item > List” process and not by custom code. The code I am using to add a task is shown below.
    What I have noticed is if I use my code to add a Task to a Task List created by Visual studio “Add > New Item > List” process, I get an error. Error message when adding an item:
    Call failed. Error: An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected.
    But if I create the same list using custom code I don't get an error.
    Am I missing something in my custom code or is this a bug?
    I hope you can help.
    CEStar
    App.js Code:
    function createItem() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/?$select=Title,CurrentUser/Id&$expand=CurrentUser/Id",
    type: "GET",
    dataType: "json",
    headers: {
    Accept: "application/json;odata=verbose"
    call.done(function (data, textStatus, jqXHR) {
    var userId = data.d.CurrentUser.Id;
    addItem(userId);
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function addItem(userId) {
    var due =
    new Date();
    due.setDate(due.getDate() + 7);
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists/getByTitle('CATasks')/Items",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.Data.CATasksListItem" },
    Title: "Sample Task",
    AssignedToId: userId,
    DueDate: due
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var div = jQuery("#message");
    div.text("Item added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    failHandler(jqXHR, textStatus, errorThrown);
    function failHandler(jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);
    Create List Custom Code:
    function createList() {
    var call = jQuery.ajax({
    url: _spPageContextInfo.webAbsoluteUrl + "/_api/Web/Lists",
    type: "POST",
    data: JSON.stringify({
    "__metadata": { type:
    "SP.List" },
    BaseTemplate: SP.ListTemplateType.tasks,
    Title: "CATasks"
    headers: {
    Accept: "application/json;odata=verbose",
    "Content-Type":
    "application/json;odata=verbose",
    "X-RequestDigest": jQuery("#__REQUESTDIGEST").val()
    call.done(function (data, textStatus, jqXHR) {
    var message = jQuery("#message");
    message.text("List added");
    call.fail(function (jqXHR, textStatus, errorThrown) {
    var response = JSON.parse(jqXHR.responseText);
    var message = response ? response.error.message.value : textStatus;
    alert("Call failed. Error: " + message);

    Hi,
    I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.
    Thanks 
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Patrick Liang
    TechNet Community Support

  • The volume slowly increases to the 100% even when I set the volume slider to 1%...

    When I try to set the volume lower on my PC, it quickly increases to 100% volume, even when I set the volume slider to 1 or 2%. When I set it to 0%, however, it does mute the volume. It's rediculous! I just want quieter music, but I am constantly blasted by maxed out volume...

    A stuck multimedia key on your keyboard to increase the volume perhaps? iTunes won't change the volume of its own accord. Perhaps there is an option in your control panel to disable the function.
    tt2

  • When I set the right date, it blocks my yahoo mail

    My date time is one day ahead, when i set the right date, my yahoo mail gets crazy and stop sending mails. 

    It would be best to respond to [email protected] as I can't get to me regular e-mail.
    Jim Wolf

  • I already set the Main-Class:class parameter but still error... Help pls...

    I have an experimental project that starts with a main class called "mainConsole"
    I packed it using the NetBeans IDE 3.3.2 jar packager and also set the Main-Class: mainConsole parameter
    I still receive the error below when trying to execute the jar file.
    java.lang.NoClassDefFoundError: mainConsole
    Exception in thread "main"
    Can someone help me?
    Thanks in advance.

    Help me pleeeease!!

  • Setting the traffic class in ServerSocket

    Hi all,
    in a ServerSocket I want to mark the dscp fields of the packets which are flowing through the client. I set the traffic class field as follows:
    Socket inSock = serverSocket.accept();
    inSock.setTrafficClass(64);
    but this has a problem that the first packet sent by the inSock cannot be marked. This occurs because the first packet is sent in the accept() method, but I set the traffic class after this packet is sent. Then do you know any solution to set the tos as the default (set before the first packet) option for all sockets accepted by a ServerSocket.
    I have some very workaround solutions such as implementing the SocketImpl and etc.But I want a KISS (Keep it simple stupid).
    Thanks.

    Yes thanks for your offer it would be good approach. but this arouses a new problem that my ServerSocket are created by a factory and I need to find a transparent solution in which for all ServerSocketFactory objects my solution works well. Let's see the example.
    MyChannel(ServerSocketFactory f) {
    ServerSocket serverSock = f.createServerSocket(param1, param2, ....);
    Socket inSock = serverSock.accep();
    In this case how can I morph the serverSock instance to my MySpecialServerSocket object for example.
    Indeed I need only overriding accept method, and I need this to do for an instance not an object.
    Do you know any way to do it?
    For example we can do a thing as follows:
    MyObject ob = new MyObject() {
    public overridenMethod() {
    };

Maybe you are looking for