visual-studio-2012

How to access element by name at a specific ListBox index

…衆ロ難τιáo~ 提交于 2019-12-25 11:42:27
问题 I have a ListBox with several items on it (TextBlocks, Images and so on), what I'm trying to do is access an element by it's name at a specific ListBox index. I know the element name and the index i need to access, in this case I need to change the visibility property of an image control to collapsed. I've looked at a few examples using VisualTreeHelper here but they were only to access element by name, not by name and index, which is what i need to do but have not been able to. Thanks, Bob.

how to construct class whose constructor function might have multiple parameter or none in template?

只谈情不闲聊 提交于 2019-12-25 11:05:42
问题 Now I want to write a general template which can instance class, of course, these classes might have none or multiple parameters. So the template must have variadic arguments. Anybody can help me? To better make myself understood, please see the follwong simple code snippet, I don't know how to make it work: class Print { public: Print(const char* param, const char* param2) : m_str1(param) , m_str2(param2) {} void outPut() { std::cout << m_str1 << "\t" << m_str2 << std::endl; } private: std:

how to override the properties in child project

青春壹個敷衍的年華 提交于 2019-12-25 10:58:22
问题 I am working on Windows Phone app Development, I have 3 projects 1) Library Project 2) Child Project 1 referencing the library project 3) Child Project 2 referencing the library project In Library project it contains all xaml files,.cs files etc... In my child project it contain only a MainPage.xaml and its .cs file where I am navigating it to a page in my library project. But there are few condition in my library project code and it will work based on those conditions like : In my library

CertCreateCertificateChainEngine returning “Invalid Parameter” (0x80070057)

醉酒当歌 提交于 2019-12-25 10:21:33
问题 I have been trying to create a non-default certificate chain using modified version of an example posted https://msdn.microsoft.com/en-us/library/windows/desktop/aa382042(v=vs.85).aspx CERT_CHAIN_ENGINE_CONFIG chainConfig; HCERTCHAINENGINE hChainEngine; :: SecureZeroMemory (&chainConfig, sizeof (CERT_CHAIN_ENGINE_CONFIG)); chainConfig.cbSize = sizeof(chainConfig); chainConfig.hRestrictedRoot = NULL; chainConfig.hRestrictedTrust = NULL; chainConfig.hRestrictedOther = NULL; // Following two

Crystal Report not appearing in Visual Studio 2012/13 Add New Item

烂漫一生 提交于 2019-12-25 10:19:15
问题 I have installed Crystal report 2011 SP4 on my system where VS 2012 and 2013 are already isntalled. I dont see Crystal Report showing up in Add New Item -> Reporting dialog box. 回答1: According to this document https://www.tektutorialshub.com/install-crystal-reports-visual-studio/#Visual-Studio-2013-VS-2013 you might need a newer version of CR: Visual Studio 2012 (VS 2012) You can install SP 7 or higher. Visual Studio 2013 (VS 2013) Any version above the SP 9 is allowed 来源: https:/

CertCreateCertificateChainEngine returning “Invalid Parameter” (0x80070057)

狂风中的少年 提交于 2019-12-25 10:19:09
问题 I have been trying to create a non-default certificate chain using modified version of an example posted https://msdn.microsoft.com/en-us/library/windows/desktop/aa382042(v=vs.85).aspx CERT_CHAIN_ENGINE_CONFIG chainConfig; HCERTCHAINENGINE hChainEngine; :: SecureZeroMemory (&chainConfig, sizeof (CERT_CHAIN_ENGINE_CONFIG)); chainConfig.cbSize = sizeof(chainConfig); chainConfig.hRestrictedRoot = NULL; chainConfig.hRestrictedTrust = NULL; chainConfig.hRestrictedOther = NULL; // Following two

Open Visual Studio command prompt from C# code

断了今生、忘了曾经 提交于 2019-12-25 08:53:38
问题 I am trying to open Visual studio Command prompt using C# code. Here is my code private void Execute(string vsEnvVar) { var vsInstallPath = Environment.GetEnvironmentVariable(vsEnvVar); // vsEnvVar can be VS100COMNTOOLS, VS120COMNTOOLS, VS140COMNTOOLS if (Directory.Exists(vsInstallPath)) { var filePath = vsInstallPath + "vsvars32.bat"; if (File.Exists(filePath)) { //start vs command process Process proc = new Process(); var command = Environment.GetEnvironmentVariable("ComSpec"); command = @"

Get latest revision from Visual Studio Online through code - TF30063

一曲冷凌霜 提交于 2019-12-25 08:27:55
问题 I am trying to create an automatic "get latest" -routine from our Visual Studio Online repository. However, I have tried a number of examples but they all return: TF30063: You are not authorized to access https://ourPath.visualstudio.com/DefaultCollection/ I even tried this console app, but it still returns the same error. I can login through the browser using credentials. I am running out of ideas on how to connect and get the latest code. 回答1: If you can log in through the browser using

Get latest revision from Visual Studio Online through code - TF30063

久未见 提交于 2019-12-25 08:27:15
问题 I am trying to create an automatic "get latest" -routine from our Visual Studio Online repository. However, I have tried a number of examples but they all return: TF30063: You are not authorized to access https://ourPath.visualstudio.com/DefaultCollection/ I even tried this console app, but it still returns the same error. I can login through the browser using credentials. I am running out of ideas on how to connect and get the latest code. 回答1: If you can log in through the browser using

NuGet for Microsoft.Azure packages

試著忘記壹切 提交于 2019-12-25 08:16:00
问题 I am trying to write an application that uses Microsoft Azure. I am using VS2012 and have installed update 5. I also updated NuGet to the latest version. In my code, I am using the following: using Microsoft.Azure.Management.Compute; using Microsoft.Azure.Management.Compute.Models; using Microsoft.Azure.Management.Fluent; using Microsoft.Azure.Management.Resource.Fluent.Authentication; using Microsoft.Azure.Management.Resource.Fluent.Core; When I go to package manager, 'Microsoft.Azure