문제

The system I'm working on uses a large number of custom value types internally. I'm working on a prototype UI using WPF. WPF does not know how to display the custom types. I know that I can write a custom ValueConverter to do this, but I really don't want to have to specify the use of a converter every time I bind to a class in my XAML.

Is there an Interface I can implement in the custom value type that will let WPF know how to display it natively?

Or, is there a way I can specify an application-wide value converter that will apply to any instance of our custom type, without having to specify the ValueConveter in every binding expression?

도움이 되었습니까?

해결책 2

Aha! Figured it out. I needed to write a TypeConverter and apply it to my custom types. This allows WPF to automatically figure out how to handle them without having to specify a template or converter in the XAML.

http://msdn.microsoft.com/en-us/library/ayybcxe5.aspx

다른 팁

예, 2010 년에는 특정 사용자가 누가 그룹에 추가 한 사람과 언제 누가 누가 추가 된지 알아낼 수 있습니다.

감사 데이터를 수집해야합니다.

PowerShell을 사용하여 감사 데이터를 쿼리 할 수 있습니다 (예 : 검색 한 정보를 반환합니다.

이 블로그 게시물 :

$site = Get-SPSite "http://yoursite.company.com"

$startDate = Get-Date "1/1/2013 7:00 AM" 
$loginName = "domain\user" 
$userId = $site.RootWeb.AllUsers | ? { $_.UserLogin -eq $loginName } | % { $_.ID }

function DumpEvents($site, $searchPattern, $startDate, $eventType, $eventName) {  
  $usersList = $site.RootWeb.SiteUserInfoList  

  $query = New-Object Microsoft.SharePoint.SPAuditQuery($site) 
  $query.AddEventRestriction($eventType) 
  $query.SetRangeStart($startDate) 
  $result = $site.Audit.GetEntries($query) | ? { $_.EventData -like $searchPattern }     | % { 
   [xml]$eventData = "<eventData>" + $_.EventData + "</eventData>" 
   $groupId = $eventData.SelectSingleNode("//groupid").InnerText  
   $groupName = $groupId  
   try { $groupName = $usersList.GetItemById($groupId).Name } catch { } 
   $userName = $_.UserId 
   try { $userName  = $usersList.GetItemById($_.UserId)["Name"] } catch { } 
   Write-Host $eventName "Group" $groupName "on" $_.Occurred "by" $userName 
  } 
}

Write-Host Changes in group membership of $loginName since $startDate 
Write-Host ————————————————–

$searchPattern = "*<user>$userId</user>*" 
$eventType = [Microsoft.SharePoint.SPAuditEventType]::SecGroupMemberDel 
DumpEvents $site $searchPattern $startDate $eventType "Deleted from"

Write-Host ————————————————–

$searchPattern = "*<userId>$userId</userId>*" 
$eventType = [Microsoft.SharePoint.SPAuditEventType]::SecGroupMemberAdd 
DumpEvents $site $searchPattern $startDate $eventType "Added to"
.

사용 도구 : 1. FBA. Configuration Manager for SharePoint 2013 - 저자 및 크레딧은 Steve Peschka로 간다. 다운로드에는 Readme 파일이 제공됩니다. WSP가 함께 제공되는 WSP를 등록해야하기 때문에 읽으십시오.

  1. - 저자와 크레딧은 Chris Coulson으로 간다. 다음은 설치 / 활성화 / 작업하는 방법을 알려주는 설명서입니다. 이것은 이것이 사용자 관리 ER 관리를 유용하게 테스트 할뿐만 아니라 암호 재설정 및 셀프 서비스 계정 관리와 같은 매우 유용한 기능을 가지고 있습니다.

    설치 후 (설치를 위해 설치를 위해서는 문서를 사용할 수 있습니다) 다음 단계로 이동

    1. 웹 응용 프로그램 만들기 :
    중앙 관리에서 우리는 웹 응용 프로그램을 만들고 extraret.waterfall.net을 호출하고 Windows AUTH 및 FBA를 모두 사용할 수 있습니다. 사용중인 이름은 다음을 사용합니다. ASP.NET 회원 공급자 이름= SQL_MEMEMBERSHIP 및 ASP.NET 역할 관리자 이름= SQL_ROLE. 원하는대로라고 부를 수 있습니다. 모든 곳에서 같은 이름을 사용할 수 있도록하십시오.

    2. 사용자 관리를위한 SQL 데이터베이스 만들기 :

    Browse to c:\Windows\Microsoft .NET\Framwork64\v4.0.30319
    Run aspnet_regsql.exe
    Click Next
    Choose Configure SQL Server for Application Services >> Click Next
    Enter your SQL Server Name , choose Windows Authentication and type in a Database Name
    Click Next twice to provision the database
    
    .

    3. 허가 추가 :

    이제 웹 응용 프로그램을 실행하고 필요한 권한을 부여하는 응용 프로그램 풀을 추가해야합니다. 이 경우 응용 프로그램 풀 이름은 Waterfall \ spweb입니다. 다음 단계를 수행하십시오.

        Open up SQL Management Studio, Expand the database we created and expand Security
        Right click Users and add a new User
        User Type = Windows User
        User name = choose <yourAppPoolAccountName>
        Login name = browse and choose the login name (should be same as the app pool name above) 
    
    .

    소유 스키마를 클릭하고 다음을 선택하십시오.

    aspnet_Membership_FullAccess
    aspnet_Persolalization_FullAccess
    aspnet_Profile_FullAccess
    aspnet_Roles_FullAccess
    aspnet_WebEvent_FullAcces
    
    .

    4. web.config 파일 편집 :
    다음 Web.config 파일을 편집해야합니다.

    Web Application Web.config 
    STS Application web.config 
    Central Admin web.config <br/>
    
    .

    아무것도 수행하기 전에이 파일을 백업하십시오!
    fbaconfigmgr.exe를 실행하십시오. 여기에서 필요한 코드를 얻고 Web.config를 편집 할 수있는 동안 도구가 코스를 실행하게되면 타이머 작업을 만들고 작업을 수행 할 수 있습니다. 응용 프로그램 URL 및 샘플 구성에서 FBACONFIGMGR 유형에서 다음을 선택하십시오.

    People Picker Wildcard
    Connection String
    Membership Provider
    Role Provider
    
    .

    다음을 반영하도록 기본값을 수정할 것입니다 (강조 표시된 항목 사용자 환경 당 수정이 필요함) :

    Web Application URL - http://extranet.waterfall.net
    
    People Picker Wildcard - <add key="SQL_Membership" value="%" />
    
    Connection String -
    <add name="fbaSQL" connectionString="server=SQL01;database=Extranet_User_DB;Trusted_Connection=true" />
    
    Membership Provider -
    <add connectionStringName="fbaSQL" applicationName="/"
    name="SQL_Membership"
    type="System.Web.Security.SqlMembershipProvider, System.Web,
    Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    
    Role Provider -
    <add connectionStringName="fbaSQL" applicationName="/"
    name="SQL_Role" type="System.Web.Security.SqlRoleProvider, System.Web,
    Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    
    .

    이제이 FBA가 있습니다 !!

    희망이 유용합니다!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top